How we can select a string up to specific character in php?
ie I have a string Wednesday 16-January-2013
. I need to get only up to first space.
ie output should be Wednesday
.
I done it using explode,
<?php
explode(" ",Wednesday 16-January-2013)
?>
But too many explodes and array are permitted in the code. So,
How I can do it without using explode()?