Jump to content

HEREDOC manipulation?

  • Please log in to reply
1 reply to this topic

#1 Guest_askjames01_*

  • Guests

Posted 05 May 2006 - 08:36 AM

ok, let say i have a HEREDOC like this below,

$str = <<<EOD
The heredoc line one
Second string
The last string of HEREDOC

what i want to do is to get the 2nd string line or row and then store it in a variable name.
then to determine the longest row, between the three rows and store the longest row
length value in a variable.
and last is to get the TOTAL number of rows of the HEREDOC strings.

is this probable or not?

thanks n advance.

#2 ober

  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 05 May 2006 - 02:13 PM

I'm not sure what you're trying to do. The only reason you would use HEREDOC is to echo something. If you want to do string comparisons, put the strings into an array.

Info: PHP Manual

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users