Jump to content

Please help!


stuckwithcode

Recommended Posts

I am trying to echosome text, so I convert the spaces to &nbsp  and its works, apart from the last one is show as &nbsp not as a space

 

			$test =  "car     a";
		$test = str_replace(" ", "&nbsp", $test);
		echo $test;

 

but i get "car    &nbspa", how can I get all of the spaces or get php to echo multiple spaces

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/192322-please-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.