help me to set a code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    taken from php.net
    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, 03:11.

    Comment

    Working...
    X