PHP – iterate on string characters

Use str_split to iterate ASCII strings (since PHP 5.0) If your string contains only ASCII (i.e. “English”) characters, then use str_split. $str=”some text”; foreach (str_split($str) as $char) { var_dump($char); } Use mb_str_split to iterate Unicode strings (since PHP 7.4) If your string might contain Unicode (i.e. “non-English”) characters, then you must use mb_str_split. $str=”μυρτιὲς δὲν … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)