FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » finding newlines
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: finding newlines [message #183920 is a reply to message #183918] Mon, 25 November 2013 16:34 Go to previous messageGo to previous message
Richard Yates is currently offline  Richard Yates
Messages: 86
Registered: September 2013
Karma:
Member
On Mon, 25 Nov 2013 11:12:17 -0500, bill <william(at)TechServSys(dot)com>
wrote:

> I am trying to find the first line bread in a string
> where string = "Hand Carried by Patient\n\nTo Whom It May
> Concern:\n\nR...."
>
> This code does not work: $pos = strpos($progressNote,"\n\n");
> it returns pos = false
>
> where do I err?
>
> bill

Best to include your actual code so typos can be spotted. This works,
but I do not know how it differs from yours:

<?php
$progressNote="Hand Carried by Patient\n\nTo Whom It May
Concern:\n\n";
$pos = strpos($progressNote,"\n\n");
echo $pos;
exit;
// result is 23 which is correct
?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Lan Pc Login time
Next Topic: Check if $_GET contains something other than what's allowed
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 13:00:39 GMT 2024

Total time taken to generate the page: 0.04388 seconds