Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Signup for Free!
-More Features-
-Far Less Ads-
About   Users   Help
Users & Guests Online
On Page: 1
Directory: 131
Entire Site: 6 & 1052
Page Staff: pokemon x, pennylessz, Barathemos, tgags123, alexanyways, supercool22, RavusRat,
03-28-24 07:37 AM

Thread Information

Views
26,635
Replies
135
Rating
0
Status
CLOSED
Thread
Creator
Davideo7
12-04-05 04:35 PM
Last
Post
Lazlo Falconi
05-24-16 12:54 AM
Additional Thread Details
Views: 3,475
Today: 0
Users: 0 unique

Thread Actions

Thread Closed
New Thread
New Poll
Order
Posts


7 Pages
>>
 

Official PHP Thread

 

12-04-05 04:35 PM
Davideo7 is Online
| ID: 39594 | 83 Words

Davideo7
Level: 350


POSTS: 3803/45315
POST EXP: 3473265
LVL EXP: 810029141
CP: 191067.4
VIZ: 121376432

Likes: 0  Dislikes: 0
Lets use this thread for discussion of PHP and SQL databases.

If anyone has questions about the language PHP, someone may be able to help you. Also, for those who know alot about it, can give the rest of us tips, tricks and pointers.

Currently I've been learning some of the basics to PHP, and I'm using Dreamweaver to work with PHP, which is the most popular language to use for PHP, but you can use just about any text editor you want.
Lets use this thread for discussion of PHP and SQL databases.

If anyone has questions about the language PHP, someone may be able to help you. Also, for those who know alot about it, can give the rest of us tips, tricks and pointers.

Currently I've been learning some of the basics to PHP, and I'm using Dreamweaver to work with PHP, which is the most popular language to use for PHP, but you can use just about any text editor you want.
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 55 days
Last Active: 4 min.

12-04-05 04:35 PM
Davideo7 is Online
| ID: 39595 | 54 Words

Davideo7
Level: 350


POSTS: 3804/45315
POST EXP: 3473265
LVL EXP: 810029141
CP: 191067.4
VIZ: 121376432

Likes: 0  Dislikes: 0
My first question...

What is the difference between echo and print? And which is recommended to be used more often?


2nd question...
What's the difference between the following variables:
$test1=0;
$test2=NULL;
$test3=;

The first has a 0, 2nd with a NULL, and the 3rd with nothing at all, what's the difference between using them?
My first question...

What is the difference between echo and print? And which is recommended to be used more often?


2nd question...
What's the difference between the following variables:
$test1=0;
$test2=NULL;
$test3=;

The first has a 0, 2nd with a NULL, and the 3rd with nothing at all, what's the difference between using them?
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 55 days
Last Active: 4 min.

(edited by Davideo7 on 12-04-05 04:26 PM)    

12-05-05 02:38 AM
IceWave04 is Offline
| ID: 39605 | 84 Words

IceWave04
Level: 134

POSTS: 1737/4864
POST EXP: 234892
LVL EXP: 28313877
CP: 81.0
VIZ: 24732

Likes: 0  Dislikes: 0
I have a question too... How many people, who are active enough to give adamn know anything about PHP.....?
I admit i was going to learn it but honestly i found it boring..... So now i have move on to SAme sized Similar Quality thing.... Uhh... Cold Fusion. I respect you and Bob for being able to sit there and learn such a boring and to me uninteresting language. Thats why im learning CF........ (The main reason of explaing all that was for Bob...)
I have a question too... How many people, who are active enough to give adamn know anything about PHP.....?
I admit i was going to learn it but honestly i found it boring..... So now i have move on to SAme sized Similar Quality thing.... Uhh... Cold Fusion. I respect you and Bob for being able to sit there and learn such a boring and to me uninteresting language. Thats why im learning CF........ (The main reason of explaing all that was for Bob...)
Trusted Member

Affected by 'Laziness Syndrome'

Registered: 03-01-05
Last Post: 5331 days
Last Active: 5284 days

12-05-05 05:59 PM
BigBob85 is Offline
| ID: 39631 | 180 Words

BigBob85
Level: 151

POSTS: 1233/6381
POST EXP: 217397
LVL EXP: 42793961
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
Originally posted by Davideo7
My first question...

What is the difference between echo and print? And which is recommended to be used more often?


2nd question...
What's the difference between the following variables:
$test1=0;
$test2=NULL;
$test3=;

The first has a 0, 2nd with a NULL, and the 3rd with nothing at all, what's the difference between using them?


Echo Or Print
Im fairly sure echo is faster... but print does more crap...
*quick google search*
http://www.htmlite.com/php004.php

There ya go, echo is faster, but print can return true or false values n other cool stuff.


Testing Testing 1 2 3
I think...
test1 is a numeric value, you can add numbers on to it, but cant do that to the other 2.
test2 is a null value, i neva used them before... can they be used?, i'd say that it returns like a not true value.
test3 is non existant, so its not there at all.


Davideo, can i update the vizzed [ url ] code, so it opens links in new window, cos im sik of doing < a href=....
Originally posted by Davideo7
My first question...

What is the difference between echo and print? And which is recommended to be used more often?


2nd question...
What's the difference between the following variables:
$test1=0;
$test2=NULL;
$test3=;

The first has a 0, 2nd with a NULL, and the 3rd with nothing at all, what's the difference between using them?


Echo Or Print
Im fairly sure echo is faster... but print does more crap...
*quick google search*
http://www.htmlite.com/php004.php

There ya go, echo is faster, but print can return true or false values n other cool stuff.


Testing Testing 1 2 3
I think...
test1 is a numeric value, you can add numbers on to it, but cant do that to the other 2.
test2 is a null value, i neva used them before... can they be used?, i'd say that it returns like a not true value.
test3 is non existant, so its not there at all.


Davideo, can i update the vizzed [ url ] code, so it opens links in new window, cos im sik of doing < a href=....
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1575 days
Last Active: 1209 days

(edited by BigBob85 on 12-10-05 02:26 AM)    

12-05-05 06:13 PM
Davideo7 is Online
| ID: 39633 | 54 Words

Davideo7
Level: 350


POSTS: 3805/45315
POST EXP: 3473265
LVL EXP: 810029141
CP: 191067.4
VIZ: 121376432

Likes: 0  Dislikes: 0
Ok thanks. Yeah, you can update the code if you want.

As for PHP, i'm currently learning it and I find it very interesting, it's one of the most used languages for webpages I think. I don't really find it boring to learn, it's just a matter of how your learning it I guess.
Ok thanks. Yeah, you can update the code if you want.

As for PHP, i'm currently learning it and I find it very interesting, it's one of the most used languages for webpages I think. I don't really find it boring to learn, it's just a matter of how your learning it I guess.
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 55 days
Last Active: 4 min.

12-07-05 04:51 PM
Davideo7 is Online
| ID: 39672 | 13 Words

Davideo7
Level: 350


POSTS: 3807/45315
POST EXP: 3473265
LVL EXP: 810029141
CP: 191067.4
VIZ: 121376432

Likes: 0  Dislikes: 0
When talking about booleans, integers, floats and strings, what exactly is a float?
When talking about booleans, integers, floats and strings, what exactly is a float?
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 55 days
Last Active: 4 min.

12-10-05 03:00 AM
BigBob85 is Offline
| ID: 39710 | 7 Words

BigBob85
Level: 151

POSTS: 1235/6381
POST EXP: 217397
LVL EXP: 42793961
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
Dunno, Ill reply if i find it.
Dunno, Ill reply if i find it.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1575 days
Last Active: 1209 days

12-13-05 06:45 PM
Davideo7 is Online
| ID: 39798 | 18 Words

Davideo7
Level: 350


POSTS: 3818/45315
POST EXP: 3473265
LVL EXP: 810029141
CP: 191067.4
VIZ: 121376432

Likes: 0  Dislikes: 0
When talking about arrays, what exactly is an element? And how is it different from "keys" and "values"?
When talking about arrays, what exactly is an element? And how is it different from "keys" and "values"?
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 55 days
Last Active: 4 min.

12-16-05 05:46 AM
BigBob85 is Offline
| ID: 39872 | 57 Words

BigBob85
Level: 151

POSTS: 1239/6381
POST EXP: 217397
LVL EXP: 42793961
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
I think arrays can have attachments... Well, they can in flash, im fairly sure i've seen em in php.

Such as

stats.hp = 9999
stats.mp = 999
stats.acc = 255

There all examples of elements, cos they all belong to the same thing. That this is the stats thing...

Im fairly sure this is what it is.
I think arrays can have attachments... Well, they can in flash, im fairly sure i've seen em in php.

Such as

stats.hp = 9999
stats.mp = 999
stats.acc = 255

There all examples of elements, cos they all belong to the same thing. That this is the stats thing...

Im fairly sure this is what it is.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1575 days
Last Active: 1209 days

12-16-05 06:43 AM
Davideo7 is Online
| ID: 39874 | 74 Words

Davideo7
Level: 350


POSTS: 3824/45315
POST EXP: 3473265
LVL EXP: 810029141
CP: 191067.4
VIZ: 121376432

Likes: 0  Dislikes: 0
Actually it'd be displayed as...

stats[hp]=9999
stats[mp]=999
stats[acc]=255

regaurding your example, this is called "multi-dimensional arrays".
In the example, the hp, mp and acc within those brackets are the keys, and the 9999, 999 and the 255 are the values that are stored to those keys.
So I guess when your talking about the value being stored to a key, those 2 things together are called an element? I think that's what it is.
Actually it'd be displayed as...

stats[hp]=9999
stats[mp]=999
stats[acc]=255

regaurding your example, this is called "multi-dimensional arrays".
In the example, the hp, mp and acc within those brackets are the keys, and the 9999, 999 and the 255 are the values that are stored to those keys.
So I guess when your talking about the value being stored to a key, those 2 things together are called an element? I think that's what it is.
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 55 days
Last Active: 4 min.

12-17-05 11:49 PM
BigBob85 is Offline
| ID: 39894 | 25 Words

BigBob85
Level: 151

POSTS: 1241/6381
POST EXP: 217397
LVL EXP: 42793961
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
yeh, thats it. I can remember using them, but i mostly do the array[0] array[1]

So then i can do things like

for ($i=0; $i<5; $i++){
if (array[$i] == 'bigbob85'){
Do stuff....
}
}
yeh, thats it. I can remember using them, but i mostly do the array[0] array[1]

So then i can do things like

for ($i=0; $i<5; $i++){
if (array[$i] == 'bigbob85'){
Do stuff....
}
}
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1575 days
Last Active: 1209 days

03-01-06 06:18 PM
IceWave04 is Offline
| ID: 41116 | 75 Words

IceWave04
Level: 134

POSTS: 1850/4864
POST EXP: 234892
LVL EXP: 28313877
CP: 81.0
VIZ: 24732

Likes: 0  Dislikes: 0
*sigh*

once again im learning PHP but this time... theres no quiting... in my multimedia course we are being taught PHP, this is the first time the course has ever done it... im just lucky i guess... So by the end of the year i am garunteed to know PHP... i just thought i would let you know... ill also let you know when we actually start the PHP... imnot sure when it actually is...
*sigh*

once again im learning PHP but this time... theres no quiting... in my multimedia course we are being taught PHP, this is the first time the course has ever done it... im just lucky i guess... So by the end of the year i am garunteed to know PHP... i just thought i would let you know... ill also let you know when we actually start the PHP... imnot sure when it actually is...
Trusted Member

Affected by 'Laziness Syndrome'

Registered: 03-01-05
Last Post: 5331 days
Last Active: 5284 days

03-02-06 04:32 AM
BigBob85 is Offline
| ID: 41137 | 11 Words

BigBob85
Level: 151

POSTS: 1484/6381
POST EXP: 217397
LVL EXP: 42793961
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
HA!.

You enjoy it more if your learning on your own...
HA!.

You enjoy it more if your learning on your own...
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1575 days
Last Active: 1209 days

03-04-06 07:25 AM
IceWave04 is Offline
| ID: 41304 | 13 Words

IceWave04
Level: 134

POSTS: 1859/4864
POST EXP: 234892
LVL EXP: 28313877
CP: 81.0
VIZ: 24732

Likes: 0  Dislikes: 0
maybe... but im gonna learn it when my future depends on it
maybe... but im gonna learn it when my future depends on it
Trusted Member

Affected by 'Laziness Syndrome'

Registered: 03-01-05
Last Post: 5331 days
Last Active: 5284 days

03-07-06 04:16 AM
BigBob85 is Offline
| ID: 41463 | 4 Words

BigBob85
Level: 151

POSTS: 1528/6381
POST EXP: 217397
LVL EXP: 42793961
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
Same... Stupid C++ :@
Same... Stupid C++ :@
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1575 days
Last Active: 1209 days

03-29-06 10:56 AM
Bookworm is Offline
| ID: 43023 | 39 Words

Bookworm
Level: 36


POSTS: 44/240
POST EXP: 13210
LVL EXP: 307449
CP: 0.0
VIZ: 2915

Likes: 0  Dislikes: 0
Originally posted by BigBob85
Same... Stupid C++ :@


Well, it seems to me if you learn PHP first it makes C++ much easier to understand; b/c PHP is a simplafied version of C++... or at least it seems that way.
Originally posted by BigBob85
Same... Stupid C++ :@


Well, it seems to me if you learn PHP first it makes C++ much easier to understand; b/c PHP is a simplafied version of C++... or at least it seems that way.
Member
Moving to Orlando, Florda.


Affected by 'Laziness Syndrome'

Registered: 07-08-05
Last Post: 6010 days
Last Active: 5418 days

05-18-06 07:46 PM
BigBob85 is Offline
| ID: 47830 | 44 Words

BigBob85
Level: 151

POSTS: 2357/6381
POST EXP: 217397
LVL EXP: 42793961
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
But PHP is write and then watch. C++ is write, compile, ERRORSS! DAMN YOU!
I dont understand the errors about linkage n stuff. And i include files, and it says they dont exist... So im sticking to php till i learn C in Uni
But PHP is write and then watch. C++ is write, compile, ERRORSS! DAMN YOU!
I dont understand the errors about linkage n stuff. And i include files, and it says they dont exist... So im sticking to php till i learn C in Uni
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1575 days
Last Active: 1209 days

05-18-06 07:49 PM
Lowell is Offline
| ID: 47834 | 48 Words

Lowell
Level: 57


POSTS: 212/661
POST EXP: 49321
LVL EXP: 1426939
CP: 24.4
VIZ: 2716

Likes: 0  Dislikes: 0
All I had to do was familiarize myself with how C++ looked and worked, and then PHP was a lot easier to learn. So I think it works both ways.

I used a game called Colobot to get my C++ experience, and that isn't even coding real C++.
All I had to do was familiarize myself with how C++ looked and worked, and then PHP was a lot easier to learn. So I think it works both ways.

I used a game called Colobot to get my C++ experience, and that isn't even coding real C++.
Vizzed Elite

Affected by 'Laziness Syndrome'

Registered: 12-07-04
Location: Portland
Last Post: 3708 days
Last Active: 2512 days

05-18-06 08:05 PM
BigBob85 is Offline
| ID: 47856 | 34 Words

BigBob85
Level: 151

POSTS: 2367/6381
POST EXP: 217397
LVL EXP: 42793961
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
Ok's back to filtering out any unwanted characters in a string... Only allowing A-Z a-z 0-9. They involve that in the string... it confuses me.. Ill get an example if i can find one.
Ok's back to filtering out any unwanted characters in a string... Only allowing A-Z a-z 0-9. They involve that in the string... it confuses me.. Ill get an example if i can find one.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1575 days
Last Active: 1209 days

05-18-06 08:15 PM
Lowell is Offline
| ID: 47869 | 115 Words

Lowell
Level: 57


POSTS: 221/661
POST EXP: 49321
LVL EXP: 1426939
CP: 24.4
VIZ: 2716

Likes: 0  Dislikes: 0
Originally posted by BigBob85
Ok's back to filtering out any unwanted characters in a string... Only allowing A-Z a-z 0-9. They involve that in the string... it confuses me.. Ill get an example if i can find one.


function illeg($var){
$chars = array("--" => "","\" => "",'"' => '',"'" => "","`" => ""," " => "",
";" => "","~" => "","!" => "","#" => "","$" => "","%" => "","^" => "","&" => "",
"*" => "","(" => "",")" => "","=" => "","{" => "","}" => "","[" => "","]" => "",
":" => "","<" => "",">" => "","," => "","/" => "","?" => "","|" => "");
return str_replace(array_keys($chars),$chars,$var);
}


Put that function somewhere, and then call it like...
$newname=illeg($oldname);
Originally posted by BigBob85
Ok's back to filtering out any unwanted characters in a string... Only allowing A-Z a-z 0-9. They involve that in the string... it confuses me.. Ill get an example if i can find one.


function illeg($var){
$chars = array("--" => "","\" => "",'"' => '',"'" => "","`" => ""," " => "",
";" => "","~" => "","!" => "","#" => "","$" => "","%" => "","^" => "","&" => "",
"*" => "","(" => "",")" => "","=" => "","{" => "","}" => "","[" => "","]" => "",
":" => "","<" => "",">" => "","," => "","/" => "","?" => "","|" => "");
return str_replace(array_keys($chars),$chars,$var);
}


Put that function somewhere, and then call it like...
$newname=illeg($oldname);
Vizzed Elite

Affected by 'Laziness Syndrome'

Registered: 12-07-04
Location: Portland
Last Post: 3708 days
Last Active: 2512 days

(edited by Lowell on 05-18-06 06:19 PM)    

Links

Page Comments


This page has no comments

Adblocker detected!

Vizzed.com is very expensive to keep alive! The Ads pay for the servers.

Vizzed has 3 TB worth of games and 1 TB worth of music.  This site is free to use but the ads barely pay for the monthly server fees.  If too many more people use ad block, the site cannot survive.

We prioritize the community over the site profits.  This is why we avoid using annoying (but high paying) ads like most other sites which include popups, obnoxious sounds and animations, malware, and other forms of intrusiveness.  We'll do our part to never resort to these types of ads, please do your part by helping support this site by adding Vizzed.com to your ad blocking whitelist.

×