Try with mb_strlen
see
http://www.php.net/manual/en/function.mb-strlen.php
2013/7/5 Jim Giner jim.gi...@albanyhandball.com
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!)
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
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:
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
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
On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner jim.gi...@albanyhandball.comwrote:
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.
--
On 7/5/2013 1:32 PM, shiplu wrote:
On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner jim.gi...@albanyhandball.comwrote:
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
On Fri, Jul 5, 2013 at 8:33 PM, Jim Giner jim.gi...@albanyhandball.comwrote:
On 7/5/2013 1:32 PM, shiplu wrote:
On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner jim.gi...@albanyhandball.com
**wrote:
Mike Hall comes back as 10, not 9
F.B. comes back as 5, not 4.
Doesn't work for me.
php
On Fri, Jul 5, 2013 at 8:39 PM, Jim Giner jim.gi...@albanyhandball.comwrote:
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
On 7/5/2013 2:42 PM, Matijn Woudt wrote:
On Fri, Jul 5, 2013 at 8:39 PM, Jim Giner jim.gi...@albanyhandball.comwrote:
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
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
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
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
Jim Giner jim.gi...@albanyhandball.com 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
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:
?php
?php if(strlen($_POST['item01'] . $_POST['item02'] .
strlen($_POST['item03'])) { ?
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
On Fri, 23 Jul 2004 09:34:24 -0500, Jake Stonebender
[EMAIL PROTECTED] wrote:
?php if(strlen($_POST['item01'] . $_POST['item02'] .$_POST['item03'])) { ?
That's what I actually meant. Sorry.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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 says
Good day,
Could you post this mystery string 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 Message-
From: Gil Disatnik [mailto:[EMAIL
Of course.
Following is a part Hebrew part English text I have in my phorum, it
probably won't look good on a system without Hebrew support.
String on a file:
---snip---
îé ùøåöä îåæîð/ú ìëúåá àú ùìå...(àí éù).
370304 - DooG
îäçìåöéí P-:
NP - King Crimson - Beat
Think you could post a base64_encode() version of that string?
On Tue, 19 Mar 2002, Gil Disatnik wrote:
Of course.
Following is a part Hebrew part English text I have in my phorum, it
probably won't look good on a system without Hebrew support.
String on a file:
---snip---
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 word
22 matches
Mail list logo