Results 1 to 2 of 2

Thread: help me to set a code

  1. #1
    Senior Member Lue_chin's Avatar
    Join Date
    Aug 2011
    Location
    earth
    Posts
    99
    Thanks
    18
    Thanked 43 Times in 14 Posts
    Rep Power
    2

    Default help me to set a code

    hello friends i have a idea and want a code for this
    can we paste the first 15 character of a story
    means i have a full story or description about something
    For ex : if a description
    nokia 5233 is the mobile which have more powerful fictions and i want to paste like this Nokia 5233 is the mobile.....
    can we do this with php

  2. #2
    Senior Member something else's Avatar
    Join Date
    Feb 2008
    Location
    if($something){echo 'Status code 404'; }else{ echo 'coding-talk.com';}
    Posts
    1,819
    Thanks
    210
    Thanked 448 Times in 202 Posts
    Rep Power
    0

    Default

    taken from [Only registered and activated users can see links. Click Here To Register...]
    PHP Code:
    <?php
    $rest 
    substr("abcdef"0, -1);  // returns "abcde"
    $rest substr("abcdef"2, -1);  // returns "cde"
    $rest substr("abcdef"4, -4);  // returns false
    $rest substr("abcdef", -3, -1); // returns "de"
    ?>
    Just realized i copyied the above code with negative last numbers .... they can be positive also (counting from begining of string)
    so in your case you would need
    PHP Code:
    $rest substr($rest015);  // returns first 15 chars 
    Last edited by something else; 19-03-12 at 03:11.

    [Only registered and activated users can see links. Click Here To Register...]


  3. The Following User Says Thank You to something else For This Useful Post:

    Lue_chin (20-03-12)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19