SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I change this?

    I've tried everything I can think of but I guess I'm still to noob

    Right now the line under (THIS LINE HERE) reads the caption files called
    somepic.jpg.txt

    How can I change it to read them as
    somepic.txt

    PHP Code:
     // start page
      
    if($page=="" || $page==1)
      {
       
    $x=0;
       
    $page 1;
      }
      else
       
    $x = (($page-1)*($totxpage));
      
    $r=0;

      
    // print of table
      
    foreach($a_img as $key=>$val)
      {

    //THIS LINE HERE
    $caption_name "$imgdir/$a_img[$x].txt"

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    // start page
      
    if($page=="" || $page==1)
      {
       
    $x=0;
       
    $page 1;
      }
      else
       
    $x = (($page-1)*($totxpage));
      
    $r=0;

      
    // print of table
      
    foreach($a_img as $key=>$val)
      {

    //THIS LINE HERE
    $caption_name "$imgdir/" substr($a_img[$x], 0, -4) . ".txt"
    Try that?

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you! That worked! I feel like an idiot. I tried something similar, but forgot a (.)

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No worries!! You will pick up PHP soon enough; it's all about trial and error, just keep up the good work.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks again

    Where did they put the mark as resolved thing?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •