This is string store in database. $sentence = "UserName=qaidoshkosh|| Majlis=willingboro|| Submit=Submit||"; I want to output of string just like that. $sentence = "qaidoshkosh willingboro Submit";
Your developer is not very good. That should have been in a table with column names UserName, Majlis and Submit. To output that as it is you would use - $var = explode("|| ", $sentence); for($x = 1; x <= 3; x++){ $var2 = explode("=", $var[$x]); echo $var2[1]; } Although that was off the top of my head so could be wrong.
$sentence = "UserName=qaidoshkosh|| Majlis=willingboro|| Region=east||"; $var = explode("|| ", $sentence); for($x = 0; $x <= 3; $x++) { $var2 = explode("=", $var[$x]); echo $var2[1]; }