1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Echo! something afte the word first

Discussion in 'PHP' started by me4you, Oct 30, 2009.

  1. #1
    $pos = ($i == 0 ) ? 'first': (($i == count($this->children[$pid])-1) ? 'last' :'');


    which is printing text first, i need to add a digit after the word first, like first1 first2 and so on..

    Please give me the the code. i wana put something after 'first-Here'

    $pos is under a function.

    Thanks.
     
    me4you, Oct 30, 2009 IP
  2. emed

    emed Peon

    Messages:
    70
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $pos = ($i == 0 ) ? 'first'."Just add whatever you want here, $variables etc": (($i == count($this->children[$pid])-1) ? 'last' :'');

    is that what you mean?
     
    emed, Oct 30, 2009 IP
  3. me4you

    me4you Well-Known Member

    Messages:
    1,989
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    155
    #3
    emed thanks so much , done, I think i missed the dot (.) to concatenate two strings. i was not coding last few moths ...just forgetting common things .. thanks again, Rahman
     
    me4you, Oct 31, 2009 IP