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
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
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
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
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
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
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
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'
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
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
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
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
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
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
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
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
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
> 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) { ?>
>
>
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
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
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
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()
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
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
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
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;
}
?>
26 matches
Mail list logo