LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Php String Handling (https://www.linuxquestions.org/questions/programming-9/php-string-handling-482493/)

joelhop 09-11-2006 01:39 PM

Php String Handling
 
I've got a Php question. I am more familiar with shell scripting but I believe a lot of the same principles apply. If I've got a string variable in php say:

$z is currently equal to:

object(GreenClass)#1 (2) { ["number"]=> int(3) ["description"]=> string(19) "This class is green" }

What if I just wanted to grab: "This class is green"

Does php allow for things such as awk, or sed, or grep? Any help would be greatly appreciated. Links, other forum discussions etc, about string manipulation in php.

Thanks,
KARL

Wim Sturkenboom 09-11-2006 11:21 PM

substr
ereg
Both pages contain links to other functions (i.e. for replace) just before the user commaents.


All times are GMT -5. The time now is 02:22 AM.