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.

PHP array help

Discussion in 'PHP' started by HorrorMovies, Jul 1, 2009.

  1. #1
    I am looking to get the post_image to echo its value main_1.jpg

    Array ( [0] => stdClass Object ( [post_image] => main_1.jpg ) )


    How do I do it?

    Thanks.
     
    HorrorMovies, Jul 1, 2009 IP
  2. AlilG

    AlilG Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what is that post_image?
    its file?

    i mean you sent that value via
    <input type="file".... ?
     
    AlilG, Jul 1, 2009 IP
  3. HorrorMovies

    HorrorMovies Notable Member

    Messages:
    1,466
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    250
    #3
    No its the name of a column in a database
     
    HorrorMovies, Jul 1, 2009 IP
  4. AlilG

    AlilG Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    check this out, may it help
    
    http://bytes.com/groups/php/609821-accessing-stdclass-object-vars
    
    Code (markup):
     
    AlilG, Jul 1, 2009 IP
  5. vaibhavcoder

    vaibhavcoder Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Please make it more clear ,

    How are you fetching the data from the database .I mean use mysql_fetch_array() which will again give you one array in return.

    I am not sure if this is what you are looking for.

    Noddy
     
    vaibhavcoder, Jul 1, 2009 IP