Re: [PHP] strlen ?

2013-07-11 Thread Caio Tavares
Try with mb_strlen see http://www.php.net/manual/en/function.mb-strlen.php 2013/7/5 Jim Giner > Trying to manage line breaks in some output I'm generating and using > strlen to measure the lengths of the strings I'm printing. Discovered > something strange (to me!) in that strlen is returning

Re: [PHP] strlen ?

2013-07-06 Thread Lester Caine
Jim Giner wrote: It's probably worth checking the sting length back through your code just to confirm what added it? The best I can figure is that I did a preload of many of the names from a csv file. Apparently when I do that it stores the LF at the end of the csv line. Have to remember that

Re: [PHP] strlen ?

2013-07-06 Thread Jim Giner
On 7/6/2013 2:59 AM, Lester Caine wrote: Jim Giner wrote: And the answer is - yes, there is a LF char at the end of my data in my whole table. Now the question is - how the heck did I put that in there? Certainly not intentionally. The data is captured from a d/e screen I wrote and it simply

Re: [PHP] strlen ?

2013-07-05 Thread Lester Caine
Jim Giner wrote: And the answer is - yes, there is a LF char at the end of my data in my whole table. Now the question is - how the heck did I put that in there? Certainly not intentionally. The data is captured from a d/e screen I wrote and it simply grabs the post value and inserts a new rec

Re: [PHP] strlen ?

2013-07-05 Thread Ashley Sheridan
Jim Giner wrote: >On 7/5/2013 3:02 PM, Stephen wrote: >> On 13-07-05 02:50 PM, Jim Giner wrote: >>> >>> Now the question is - how the heck did I put that in there? >Certainly >>> not intentionally. The data is captured from a d/e screen I wrote >and >>> it simply grabs the post value and inser

Re: [PHP] strlen ?

2013-07-05 Thread John Meyer
MOTS: never take any input on faith. Jim Giner wrote: On 7/5/2013 3:02 PM, Stephen wrote: On 13-07-05 02:50 PM, Jim Giner wrote: Now the question is - how the heck did I put that in there? Certainly not intentionally. The data is captured from a d/e screen I wrote and it simply grabs the p

Re: [PHP] strlen ?

2013-07-05 Thread Jim Giner
On 7/5/2013 3:02 PM, Stephen wrote: On 13-07-05 02:50 PM, Jim Giner wrote: Now the question is - how the heck did I put that in there? Certainly not intentionally. The data is captured from a d/e screen I wrote and it simply grabs the post value and inserts a new record with that value along w

Re: [PHP] strlen ?

2013-07-05 Thread Stephen
On 13-07-05 02:50 PM, Jim Giner wrote: Now the question is - how the heck did I put that in there? Certainly not intentionally. The data is captured from a d/e screen I wrote and it simply grabs the post value and inserts a new record with that value along with some other values. And I don'

Re: [PHP] strlen ?

2013-07-05 Thread Jim Giner
On 7/5/2013 2:42 PM, Matijn Woudt wrote: On Fri, Jul 5, 2013 at 8:39 PM, Jim Giner wrote: I checked them in the db manually. Clicked on the name, selected it, no extra space highlighted. Cursored through the length of the value - no extra movements. That does still not guarantee there ar

Re: [PHP] strlen ?

2013-07-05 Thread Matijn Woudt
On Fri, Jul 5, 2013 at 8:39 PM, Jim Giner wrote: > I checked them in the db manually. Clicked on the name, selected it, no > extra space highlighted. Cursored through the length of the value - no > extra movements. > That does still not guarantee there are no extra characters. Some characters

Re: [PHP] strlen ?

2013-07-05 Thread Matijn Woudt
On Fri, Jul 5, 2013 at 8:33 PM, Jim Giner wrote: > On 7/5/2013 1:32 PM, shiplu wrote: > >> On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner >> **wrote: >> >> Mike Hall comes back as 10, not 9 >>> F.B. comes back as 5, not 4. >>> >>> >> Doesn't work for me. >> >> php > var_dump("Mike Hall", strlen("Mi

Re: [PHP] strlen ?

2013-07-05 Thread Jim Giner
On 7/5/2013 1:32 PM, shiplu wrote: On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner wrote: Mike Hall comes back as 10, not 9 F.B. comes back as 5, not 4. Doesn't work for me. php > var_dump("Mike Hall", strlen("Mike Hall")); string(9) "Mike Hall" int(9) Try trimming it first and then apply strl

Re: [PHP] strlen ?

2013-07-05 Thread shiplu
On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner wrote: > Mike Hall comes back as 10, not 9 > F.B. comes back as 5, not 4. > Doesn't work for me. php > var_dump("Mike Hall", strlen("Mike Hall")); string(9) "Mike Hall" int(9) Try trimming it first and then apply strlen. -- Shiplu.Mokadd.im ImgSign

Re: [PHP] strlen ?

2013-07-05 Thread John Meyer
Jim Giner wrote: Trying to manage line breaks in some output I'm generating and using strlen to measure the lengths of the strings I'm printing. Discovered something strange (to me!) in that strlen is returning +1 more than it should. The strings are from a query of my database - simple name

[PHP] strlen ?

2013-07-05 Thread Jim Giner
Trying to manage line breaks in some output I'm generating and using strlen to measure the lengths of the strings I'm printing. Discovered something strange (to me!) in that strlen is returning +1 more than it should. The strings are from a query of my database - simple name fields. But eve

Re: [PHP] strlen question

2004-07-23 Thread Jake Stonebender
On Fri, 23 Jul 2004 09:34:24 -0500, Jake Stonebender <[EMAIL PROTECTED]> wrote: That's what I actually meant. Sorry. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strlen question

2004-07-23 Thread Jake Stonebender
I'm shooting for succinctness here. I'd like to see if someone has a shorter solution. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strlen question

2004-07-23 Thread Matt M.
> the form is separated into 5 sections and if there are no items filled out > in that section, then i need to hide the title too. > > I have been playing around with the syntax and am not having any > success...any suggestions? > > here is a sample of what i am trying: > > 0) { ?> > >

[PHP] strlen question

2004-07-23 Thread msa
I have successfully hidden some parts of a form based on items being blank with following code: 0) { ?> (with the help of this forum!!) the form is separated into 5 sections and if there are no items filled out in that section, then i need to hide the title too. I have been playing around

RE: [PHP] strlen() gives a wrong count

2002-03-19 Thread Rasmus Lerdorf
ing so that we could help you? > > > > > >Darren Gamble > >Planner, Regional Services > >Shaw Cablesystems GP > >630 - 3rd Avenue SW > >Calgary, Alberta, Canada > >T2P 4L4 > >(403) 781-4948 > > > > > >-Original Messa

RE: [PHP] strlen() gives a wrong count

2002-03-19 Thread Gil Disatnik
lp you? > > >Darren Gamble >Planner, Regional Services >Shaw Cablesystems GP >630 - 3rd Avenue SW >Calgary, Alberta, Canada >T2P 4L4 >(403) 781-4948 > > >-Original Message----- >From: Gil Disatnik [mailto:[EMAIL PROTECTED]] &g

RE: [PHP] strlen() gives a wrong count

2002-03-19 Thread Darren Gamble
PROTECTED]] Sent: Tuesday, March 19, 2002 1:12 PM To: [EMAIL PROTECTED] Subject: [PHP] strlen() gives a wrong count Hello there, I have a 98 characters string (including spaces), wc -c says it's 98 characters and a file containing this string is 98 bytes as well. For some reason - strlen()

Re: [PHP] strlen() gives a wrong count

2002-03-19 Thread Rasmus Lerdorf
Well, how are you putting it into the string? On Tue, 19 Mar 2002, Gil Disatnik wrote: > Hello there, > > I have a 98 characters string (including spaces), wc -c says it's 98 > characters and a file containing this string is 98 bytes as well. > > For some reason - strlen() says it's more... it s

[PHP] strlen() gives a wrong count

2002-03-19 Thread Gil Disatnik
Hello there, I have a 98 characters string (including spaces), wc -c says it's 98 characters and a file containing this string is 98 bytes as well. For some reason - strlen() says it's more... it says it's a 104 characters strings, when I removed the spaces (using sed on the shell and using s

Re: [PHP] strlen

2001-07-25 Thread David Robley
On Thu, 26 Jul 2001 05:49, David OBrien wrote: > I'm having a heck of a time getting something to work like it should > > I have a script which reads a list of words one per line > I want it to display the length of the word a tab then the word. No > matter how I code it it still only shows the wo

[PHP] strlen

2001-07-25 Thread David OBrien
I'm having a heck of a time getting something to work like it should I have a script which reads a list of words one per line I want it to display the length of the word a tab then the word. No matter how I code it it still only shows the word alone on strlen. Any ideas? $blen) ? -1 : 1; } ?>