Forum Moderators: coopster
$data="john,hari,gupta";
Now I want to remove hari from the $data and form the string as
$data="john,gupta";
I have exploded the data using explode function.
explode(',',$data);
But I dont no how to remove the element and form the string as shown in the example above. Please help
The data could be anyhing like
$data="john,peter,dsa,weer,syz";
Now how have a form where I post say john, it should delete 'john' and form the string as
$data="peter,dsa,weer,syz";
If I use str_replace(',john', '', $data) it would'nt work. So any other way