| How to explode data and delete one line?
|
toplisek

msg:4311796 | 12:57 pm on May 13, 2011 (gmt 0) | I have code like: $databasedata = '/*space*/text/*space*/|'; $mydata = explode("|", $databasedata); When I explode it will be one space after word like blabla /*space*/ Notice: data from which are exloded have also space. How to delete this space with one line?
|
Finger

msg:4312847 | 1:06 am on May 16, 2011 (gmt 0) | The trim() function should work if I understand your question correctly.
|
toplisek

msg:4312951 | 7:50 am on May 16, 2011 (gmt 0) | thank you. So, this will work? The SPACE at the beginning of the string $string=" eggs sold here"; $newstring=ltrim($string," "); // left trim The above will output:eggs sold her
|
toplisek

msg:4313012 | 10:29 am on May 16, 2011 (gmt 0) | This works. Can be just ONE line with this code as I have line to lower characters: $var[$i] = mb_strtolower($element, 'UTF-8'); $var[$i] =rtrim($element," "); // right trim
|
|
|