Guest askjames01 Posted May 5, 2006 Share Posted May 5, 2006 ok, let say i have a HEREDOC like this below,[code]$str = <<<EODThe heredoc line oneSecond stringThe last string of HEREDOCEOD;[/code]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. Quote Link to comment https://forums.phpfreaks.com/topic/9114-heredoc-manipulation/ Share on other sites More sharing options...
ober Posted May 5, 2006 Share Posted May 5, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/9114-heredoc-manipulation/#findComment-33569 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.