LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-11-2006, 01:39 PM   #1
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Rep: Reputation: 15
Smile 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
 
Old 09-11-2006, 11:21 PM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
php: handling the objectGUID eantoranz Programming 0 05-03-2006 12:29 PM
PHP error handling paddyjoy Programming 6 02-12-2006 06:29 AM
PHP image handling/resizing benrose111488 Programming 1 07-07-2005 02:00 AM
handling downloads with php niehls Programming 0 02-09-2003 05:11 AM
PHP Link Handling Citizen Bleys Programming 1 10-10-2001 03:02 PM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration