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

Home » Imported messages » comp.lang.php » PHP Help
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP Help [message #169922 is a reply to message #169906] Thu, 30 September 2010 10:49 Go to previous message
Geoff Berrow is currently offline  Geoff Berrow
Messages: 16
Registered: September 2010
Karma:
Junior Member
On Wed, 29 Sep 2010 17:30:40 -0700, John <stepri(at)sbcglobal(dot)net>
wrote:

> Here is the line that I need to work:
>
> $length = (strlen($length) > 0) ? $length : null;
>
> I need this code to be changed so that I only see 15 characters and
> under.


I give up...

<?php

$string="Your line of text that is more than 15 chars long";

$string= substr($string, 0, 15);

echo $string;

?>

I highly recommend browsing through the functions in the manual.
--
Geoff Berrow (Put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs www.4theweb.co.uk/rfdmaker
[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
Previous Topic: Learn Php In 17 Hours.
Next Topic: Can anyone recommend a good debugger & IDE for PHP?
Goto Forum:
  

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

Current Time: Sat Nov 23 15:31:54 GMT 2024

Total time taken to generate the page: 0.04551 seconds