php syntax question. Can you help?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jovigirl
    Confirmed User
    • Apr 2003
    • 1796

    #1

    php syntax question. Can you help?

    I have the following line of code

    PHP Code:
            $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); 
    
    It gives an output like the following:
    69 pictures, last one added on March 07, 2004

    The problem is that I want to remove the last part of the sentence, so it only displays the # of pics and nothing else, like this:
    69 pictures.

    but every time I try to remove the last part of the code it gives a parse error, (sorry such file doesn't exist) as output.

    Any clues?



    Thanks
    ICQ :333-548-380
  • BradM
    Confirmed User
    • Dec 2003
    • 3397

    #2
    PHP Code:
    $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count); 
    

    Try that

    Comment

    • jovigirl
      Confirmed User
      • Apr 2003
      • 1796

      #3
      That works, thx !

      I think I had some trouble with the ""
      ICQ :333-548-380

      Comment

      • woj
        <&(©¿©)&>
        • Jul 2002
        • 47882

        #4
        That php highlighter is terrible on gray background, how can anyone read that?
        Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
        Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
        Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

        Comment

        • BradM
          Confirmed User
          • Dec 2003
          • 3397

          #5
          Originally posted by woj
          That php highlighter is terrible on gray background, how can anyone read that?
          You can't. you have to copy/paste.

          Comment

          Working...