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 6630555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:25:16+00:00 2026-05-25T22:25:16+00:00

foreach($photos as $photo) { $lastChild = ; if( $count%3 == 0 && $count !=

  • 0
foreach($photos as $photo) {
        $lastChild = "";
        if( $count%3 == 0 && $count != 0 )
            echo "</tr><tr>";
        $count++;
        ?> <td>

                <a href="<?php echo ($photo['source'])?>" title="<?php echo      ($photo['name'])?>">   


                <img id="thumb" class="thumb" src="<?php echo ($photo['picture'])?>">
                </a></td>

This is the script for draggable. Ive done this but it still does not work
only the first one
does the foreach loop affects?

$thumb.draggable({
revert: "invalid", // when not dropped, the item will revert back to its initial position
helper: "clone",
    });

im unable to set ui-draggable to all the img src other than the first img.

any one can help?

  • 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-25T22:25:17+00:00Added an answer on May 25, 2026 at 10:25 pm

    Use

    <img class="thumb" src="<?php echo ($photo['picture'])?>">
    

    instead of

    <img id="thumb" class="thumb" src="<?php echo ($photo['picture']); ?>" />
    

    in your PHP and

    $('.thumb').draggable({
    

    instead of

    $thumb.draggable({
    

    in your jQuery. This should fix it.

    If you absolutely need IDs on the images for any reason, make them unique like this:

    <img id="thumb-<?php echo $count; ?>" class="thumb" src="<?php echo ($photo['picture'])?>">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[AcceptVerbs(HttpVerbs.Post)] public ActionResult Upload(Photo photo) { foreach (string file in Request.Files) { var path
When I run this code: foreach($xml->movie as $movie) { if(isset($movie->photos)) { foreach ($movie->photos as
foreach ($_GET as $field => $label) { $datarray[]=$_GET[$field]; echo $_GET[$field]; echo <br>; } print_r($datarray);
I have to send a byte array (encoded photo) from my PHP client to
In my app I am allowing users to save photos from camera and photo
Greetings, I am adding four random photos from a featured photo album to the
I want to make a PHP JSON data foreach, but I met some problem.
This code works fine : Parallel.ForEach(photos, item => { WebClient webClient = new WebClient();
<? $string = ' Some photos<br> <span class=naslov_slike>photo_by_ile_IMG_1676-01</span><br /> <span class=naslov_slike>photo_by_ile_IMG_1699-01</span><br /> <span class=naslov_slike>photo_by_ile_IMG_1697-01</span><br
I'm using the Facebook PHP SDK to try and get the photo with the

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.