php - How to remove letter in front of the word laravel -


enter image description here

based on picture above result of var_dump() , dd() of same variable ,when var_dump() , apostrophe (') symbol in black diamond of question mark , when dd() same variable , apostrophe can seen letter 'b' appear in front of words

what want can me result :

loreal's sdn bhd

and @ same time want remove special character (excluding these 4 symbols (-) ,(_) ,('),(,) )

simply escape special character resolve issue. mysqli_real_escape_string resolve issue.

$name = mysqli_real_escape_string($request()->user); 

or use addslashes function()

$name = addslashes($request()->user); 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -