php - How to remove letter in front of the word laravel -
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
Post a Comment