Reply
Old 08-28-2009, 07:55 PM Proper php syntax
Novice Talker

Posts: 14
Name: taylor
Trades: 0
Is this syntax ok- didnt have any problems when i ran the code on my server
but then when i uploaded to go-daddy it was having problems. thanks

echo "<option value='".$R6D3021FF1D6F157789F083D1FB643E8E['prodid']."'
".$R8B2267A9CCF41F9CDBA21DE22FA4A946.">
".$R6D3021FF1D6F157789F083D1FB643E8E['prodname']."</option>";

thanks,
-tay
antioch1st is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 08-28-2009, 09:16 PM Re: Proper php syntax
NullPointer's Avatar
Will Code for Food

Latest Blog Post:
Easy PHP Search with Opera
Posts: 1,068
Name: Matt
Location: Irvine, CA
Trades: 0
I don't see any problems with it, other than the really terrible variable names. Syntax highlighting will often make it easier to see if there is an error in your code:

PHP Code:
echo "<option value='".$R6D3021FF1D6F157789F083D1FB643E8E['prodid']."'
"
.$R8B2267A9CCF41F9CDBA21DE22FA4A946.">
"
.$R6D3021FF1D6F157789F083D1FB643E8E['prodname']."</option>"
Are you getting an error message?
__________________
Tinsology | How to Post Code | EverythingDev
NullPointer is online now
Reply With Quote
View Public Profile
 
Old 08-29-2009, 05:20 AM Re: Proper php syntax
lizciz's Avatar
Ultra Talker

Posts: 330
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Just to make this easier, let's say your variable names are $var1 and $var2. You got

PHP Code:
echo "<option value='".$var1['prodid']."'".$var2.">".$var1['prodname']."</option>"
Now, lets put in some variable values.

PHP Code:
$var1['prodid'] = 123;
$var2 456;
$var1['prodname'] = 789
This will output

Code:
<option value='123'456>789</option>
That doesn't look right to me :P
Unless your $var2 holds an attribute, like

PHP Code:
$var2 " class='someclass' name='somename'"
__________________
596f75206d65616e20796f752063616e2061637475616c6c79 207265616420746869733f
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to Proper php syntax
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.12045 seconds with 13 queries