note 96272 added to function.end
| From: | public at tmsessions dot com | Date: | Thu, 18 Feb 2010 00:02:18 +0000 |
| Subject: | note 96272 added to function.end | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166102@lists.php.net to get a copy of this message | ||
I've got a javascript image array that I've put a php/sql query in to pull the file paths,
and the query echos the file path and then a comma. My gallery works great...except for in IE
(grrr) and the problem is, I need to remove the comma from the last result. I'm just having an
awfully hard time trying to get that to work. I'm pretty sure it has something to do with the
end() function but I'm stuck. Any ideas? Thanks!
var mygallery2=new fadeSlideShow({
wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
dimensions: [329, 250], //width/height of gallery in pixels. Should reflect dimensions of largest
image
imagearray: [<? $query = "SELECT * FROM gallery WHERE gall_id =2 ORDER BY image_id
ASC";
$result = mysql_query($query) or die('Whoops try again ');
if (mysql_num_rows($result) == 0)
{}
else
{
while($row=mysql_fetch_array($result, MYSQL_ASSOC))
{
$image_id = $row['image_id'];
$gall_id = $row['gall_id'];
$desc = $row['desc'];
$filepath = $row['filepath'];
$caption = $row['caption'];
$short_path = "[\"http://www.domain.us/thumbs/$filepath\",
\"\", \"\", \"$caption\" ],";
echo $short_path;
}
} ?>],
displaymode: {type:'manual', pause:2500, cycles:0, wraparound:true},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "always",
togglerid: "fadeshow2toggler"
})
</script>
----
Server IP: 69.147.83.197
Probable Submitter: 99.20.182.43
----
Manual Page -- http://www.php.net/manual/en/function.end.php
Edit -- https://master.php.net/note/edit/96272
Del: integrated -- https://master.php.net/note/delete/96272/integrated
Del: useless -- https://master.php.net/note/delete/96272/useless
Del: bad code -- https://master.php.net/note/delete/96272/bad+code
Del: spam -- https://master.php.net/note/delete/96272/spam
Del: non-english -- https://master.php.net/note/delete/96272/non-english
Del: in docs -- https://master.php.net/note/delete/96272/in+docs
Del: other reasons-- https://master.php.net/note/delete/96272
Reject -- https://master.php.net/note/reject/96272
Search -- https://master.php.net/manage/user-notes.php