0
I want to separate a string that has no separation in an array
example
$s = "123";
$array=["1","2","3"];
I tried to use it as follows valores = (array) explode("",$IdNota);
but he gives Warning: explode(): Empty delimiter in /var/www/html/Model/model.php on line 572
Someone knows how I do?
And do you really need it? PHP already accepts string indexing, treating it as an array. Depending on the case, you can already use
$s[0]
... etc without having to do any operation - See working: https://ideone.com/hkmwt8– Bacco