To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Tools > Zend Studio

Zend Studio Looking for help with Zend Studio? This is the place.

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-05-2003, 12:28 AM   #1
somedudeppf
Junior Member
 
Join Date: Oct 2003
Posts: 17
got Zend?

Ok, i'm new to php and work for a place that wants to use php for some web things. My boss learned that I have multiple coding experience and his bright idea was to get me to do some stuff for him, so he bought Zend Studio and gave it to me. Since I know nothing, (i'm currently a photographer.. yeah..) I have some questions about Zend and php in general.

I am working on making our cart run faster and be more efficient, it's fairly simple. When I run the Code Analyzer (b/c i'm lazy) it comes back with all kinds of crap. One of which is "variable $line is used before it is defined" My dumb question being, How do I define this variable?

Currently the code reads:
PHP Code:
while ($line == mysql_fetch_row($result)) {
        
$CartCount = $line[0];
what can I say, i'm new...

thanks,
adam
somedudeppf is offline   Reply With Quote
Old 11-06-2003, 09:33 PM   #2
LordShryku
kung foo code monkey
 
LordShryku's Avatar
 
Join Date: Aug 2002
Location: Occupational Hypnotherapy
Posts: 7,473
Well, I guess you could do a
PHP Code:
$line=array();
before your while statement. Seem trivial though...

Last edited by LordShryku; 11-06-2003 at 09:49 PM.
LordShryku is offline   Reply With Quote
Old 11-07-2003, 10:34 AM   #3
ahundiak
Bright Member
 
ahundiak's Avatar
 
Join Date: Aug 2002
Posts: 1,608
Or maybe fix the code.
PHP Code:
while ($line = mysql_fetch_row($result)) {
You had an extra = in there which probably caused the entire block to be skipped. The Analizer knew there was a problem but did not express itself well.
ahundiak is offline   Reply With Quote
Old 11-07-2003, 10:41 AM   #4
somedudeppf
Junior Member
 
Join Date: Oct 2003
Posts: 17
Actually, I did notice that, but that was something that the analyzer changed. I can't remember why.
somedudeppf is offline   Reply With Quote
Reply

Bookmarks


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

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
Forum Jump


All times are GMT -4. The time now is 02:15 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.