Current location: Hot Scripts Forums » Programming Languages » PHP » PHP function postitioning.


PHP function postitioning.

Reply
  #1 (permalink)  
Old 04-22-09, 01:15 PM
SniperTowers SniperTowers is offline
Wannabe Coder
 
Join Date: Dec 2008
Posts: 143
Thanks: 5
Thanked 0 Times in 0 Posts
PHP function postitioning.

I have a function, example:

PHP Code:

function liststuff($stuff){

        echo 
"<img align=\"left\" src=\"images/";
        echo 
$list['image'];
        echo 
"\" width=\"120px\" height=\"60px\" border=\"1px\">";
        echo 
"<b><a href=\"";
        echo 
$list['link']; 
        echo 
"\">";
        echo 
$list['title'];
        echo 
"</a> | ";
        echo 
stripslashes($list['description']);
        echo 
" <br/><b><a style=\"float: right\" href=\"completed.php?offer=";
        echo 
$list['id'];
        echo 
"&user=";
        echo 
$uid;
        echo 
"\"><img border=\"0px\" src=\"images/completed.png\"/></a></b>";

}} 
liststuff(); will be in my index page. but the content from the database goes underneath each other how do I get say 3 items from the database next to each other.
Reply With Quote
  #2 (permalink)  
Old 04-22-09, 05:06 PM
landing's Avatar
landing landing is offline
Coding Addict
 
Join Date: Jul 2006
Location: Scotland
Posts: 302
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not quite sure what you mean by the wording of your question.

I can't help notice however that the function doesn't have access to $list or $uid because of the natural local scope of functions. Also, you don't appear to be doing anything with $stuff (or did you mean to name $list as $stuff?)
__________________
Always sanitise your data


Best regards
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can i call a flash function from php? vivichie PHP 4 02-04-09 02:55 AM
[2005] StartPosition for CommonDialogs? tim8w Windows .NET Programming 10 01-08-09 03:39 AM
execute php into javascript function Hagoromo PHP 3 05-23-07 02:19 AM
How to modify flash so it pulls php url every 15 seconds method Flash & ActionScript 7 03-05-07 06:39 AM
accessing existing ISP email with a PHP webmail script. nlancaster PHP 1 01-07-04 03:28 AM


All times are GMT -5. The time now is 08:32 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.