Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4113454
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:19:37+00:00 2026-05-20T22:19:37+00:00

I am trying to print print this out in the html <a id=’riverwalk’ style=’display:none;’

  • 0

I am trying to print print this out in the html

 <a id='riverwalk' style='display:none;' href='images/riverwalk/1.jpg' rel='prettyPhoto[riverwalk]'></a>
<a style='display:none;' href='images/riverwalk/2.jpg' rel='prettyPhoto[riverwalk]'></a>
<a style='display:none;' href='images/riverwalk/3.jpg' rel='prettyPhoto[riverwalk]'></a>
<a style='display:none;' href='images/riverwalk/4.jpg' rel='prettyPhoto[riverwalk]'></a>

But i want to do it pro grammatically and this is my code..but just not doing anything at all

$counter = 0;
$directory = "images/riverwalk"
$dir = opendir ("images/riverwalk");
while (false !== ($file = readdir($dir))) {
        if ($counter == 0) {
            echo "<a id='riverwalk' style='display:none;' href='images/riverwalk/$file' rel='prettyPhoto[riverwalk]'></a>";
        $counter++;
        }else{
         echo "<a style='display:none;' href='images/riverwalk/$file' rel='prettyPhoto[riverwalk]'></a>";
    $counter++;
}
}

does anything look off to anyone…i cant view the errors because i cant turn php errors on…any ideas

FIX: the issue was the a semicolon missing on the second line

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:19:38+00:00Added an answer on May 20, 2026 at 10:19 pm

    Take a look at scandir() – it’s much easier to write and debug..

    $counter = 0;
    $dirf    = 'images/riverwalk';
    $dir = scandir($dirf);
    foreach($dir as $file) {
       if(($file!='..') && ($file!='.')) {
          if($counter==0)
               echo "<a id='riverwalk' style='display:none;' href='images/riverwalk/$file' rel='prettyPhoto[riverwalk]'></a>";
          else
               echo "<a style='display:none;' href='images/riverwalk/$file' rel='prettyPhoto[riverwalk]'></a>";
          $counter++;
       }
    }
    

    If that doesn’t work use is_dir() to check you’re pointing at the correct directory..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to print out a list of products on a page. This is
I am trying to print HTML with this JavaScript in the webview, however it
Trying to print out some html forms but I get a parsing syntax error.
I'm trying to print out HTML generated for user-submitter markdown , by {{=markdown(post.message)}} where
I am trying to print out HTML to an area of my site based
http://code.google.com/appengine/articles/update_schema.html Trying to work this out for a nice little updater across my web
I am trying to remove substring out of variable using sed like this: PRINT_THIS=`echo
Trying to figure out how I can do this properly. The print_r looks like
I'm trying to print in the screen this, given any number like 12: 0+12
I am trying to print a portion of the page in FF3. This works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.