PHP script basic image gallery with descriptions issue.

Discussion in 'PHP' started by sdweim85, Mar 1, 2013.

  1. #1
    Hello, I was following the tutorial below to learn how to make simple galleries with descriptions underneath in PHP when I got everything working fine, but it's only detecting the first letter of my description under each jpg. The array only seems to find the first letter and stop. My code is identical, I must have missed something.

    http://www.devtek.org/tutorials/image_gallery.php

    And the sample site I'm using it with.

    http://www.digifind-it.com/test/script.php
     
    sdweim85, Mar 1, 2013 IP
  2. SoftCloud

    SoftCloud Well-Known Member

    Messages:
    1,060
    Likes Received:
    28
    Best Answers:
    2
    Trophy Points:
    120
    #2
    Have you sorted this problem out? If not then please post the code you're using and I'll be happy to have a quick look for you. :)
     
    SoftCloud, Mar 12, 2013 IP
  3. sdweim85

    sdweim85 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    I did actually. On the line

    <br />' . $description[$file][0] . '</td>';

    I just deleted the [0] making

    <br />' . $description[$file]. '</td>';

    and it worked fine.
     
    sdweim85, Mar 12, 2013 IP