PHP

PHP replace space with dash explained with examples

⤳ If you want to “replace space with dash” in PHP, you can do so with the str_replace() function. We usually replace spaces with dashes to generate a URL-friendly slug from a given string, but you might need them for other purposes. The str_replace() function accepts ...

⌛ 3 min read

PHP double question marks (Null coalescing operator) explained

⤳ PHP double question marks (??) – officially known as Null coalescing operator – is a convenient alternative to ternary expressions in conjunction with isset(). You might have seen the following expression in your Laravel or PHP projects: But what do two question marks mean in PHP? ...

⌛ 2 min read