On 7/10/2013 8:30 AM, Karl-Arne Gjersøyen wrote:
I am almost ready with my learning project in PHP/MySQL.
I can register new product in stock.
Add and increase the number and weight.
I can move products between different storehouses
I can also transfer products from store and onto a truck
Jason Bennett wrote:
I just installed a new MYSQL version 4.1 (from 4.0) and now none of my
PHP scripts work anymore. They are all complaining about attempting to
login as root. Normally, I referance a class like:
Not a MySQL user, but don't you have to change drivers between 4.0 and
4.1 - the
You wrote:
additionally I also tend to always provide an alternative, especially
if dealing
with nested ifs or loops, even if just a comment... call it habit
(from where I
don't know).
if($condition){
do this
}else{
# oops, $condition didn't exist
}
saves a hell of alot of time when
Why you ppl. do this:
if ($condition) {
file://action 1
file://action 2
file://action 3
}
Because they have been saved.
instead of this:
if ($condition)
{
file://action 1
file://action 2
file://action 3
}
Because they are damned to hell.
:-)
Why you ppl. do this:
if ($condition) {
//action 1
//action 2
//action 3
}
instead of this:
if ($condition)
{
//action 1
//action 2
//action 3
}
with the '}' you'll see directly the new code block that belongs to the IF
statment.
anyway...it's just a style
It's called identing.
It's just there to make the script more readable. That's common to almost
all programming languages.
Some programmers doesn't ident they code anyhow.
Basically you increase the ident whenever you enter in a deeper code block.
Kyle Smith [EMAIL PROTECTED] wrote in message
Simply indent formatting for readability. I personally don't indent after
the ? tag, but to each his/her own.
Kyle Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Whenever i get a php script off a website why is it that most of the main
parts in the script
I think it's impossible to read/understand my own scripts if i don't do it.
Do:
?php
if ($submit) {
echo Counting from 1-32br;
for ($ii = '1'; $ii = '32' $ii++) {
echo $ii. ;
}
}
echo brAll done!;
?
instead of:
?php
if ($submit) {
echo Counting from 1-32br;
for ($ii =
;
}
-Original Message-
From: Fredrik Arild Takle [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 12:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Hmmm?
I think it's impossible to read/understand my own scripts if i don't do it.
Do:
?php
if ($submit) {
echo
No, no, I indent my code normally, just not after the ?php
i.e.
?php
if($submit) {
for($i=0; $i count($fileArrray); $i++) {
echo File $i - $fileArray[$i]br\n;
}
}
?
Not indenting after the ? tag just makes it easier for me when I have
hundreds of lines of php code following.
10 matches
Mail list logo