Jump to content


Photo

php statement help cheers thank you.


  • Please log in to reply
12 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 24 June 2006 - 11:43 PM

Advance thank you.

I am learning php quite well know, but i need an example in the simplest way to exsplain the following php statements cheers.

ps. Thank you for your time all the ansaws will get studed tonight.


Example of statements dont understand and also need little examples cheers.


as // how do i use what can it do a small example please.

const // how do i use what can it do a small example please.

continue // how do i use what can it do a small example please.

declaire // how do i use what can it do a small example please.

default // how do i use what can it do a small example please.

do // how do i use what can it do a small example please.

eval // how do i use what can it do a small example please.

foreach // how do i use what can it do a small example please.

globel // how do i use what can it do a small example please.

new // how do i use what can it do a small example please.

use // how do i use what can it do a small example please.

var // how do i use what can it do a small example please.


Please can a user exsplain the statements in php and give detail and a example cheers.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 24 June 2006 - 11:46 PM

um, tried the manual? It explains most things and has examples.

PS - watch the spelling :)
Legend has it that reading the manual never killed anyone.
My site

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 25 June 2006 - 12:11 AM

this works

<?php

$name=array("hi i am john");

foreach($name AS $message);

echo $message;

?>


this dosent why there is no php information to use the AS statement ?
<?php

$name="john";

$name as $mess;

echo $mess;

?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 25 June 2006 - 04:13 AM

The AS operator is only valid within the foreach statement. The foreach statement can only be used to iterate arrays (and objects in PHP5).

Ken

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 25 June 2006 - 04:16 AM

[!--quoteo(post=387658:date=Jun 25 2006, 04:13 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Jun 25 2006, 04:13 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
The AS operator is only valid within the foreach statement. The foreach statement can only be used to iterate arrays (and objects in PHP5).

Ken
[/quote]

Thank you kenrbnsn for your help cheers.

how to use DO and DEFULT
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#6 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 June 2006 - 04:51 AM

rtfm!!!

#7 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 25 June 2006 - 04:58 AM

[!--quoteo(post=387667:date=Jun 25 2006, 04:51 AM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 25 2006, 04:51 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
rtfm!!!
[/quote]

you give me the link for

defult

do

i got meny books i can not find it ok cheers.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#8 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 25 June 2006 - 05:09 AM

default I used it at switch case.
[a href=\"http://sg.php.net/manual/en/control-structures.switch.php\" target=\"_blank\"]http://sg.php.net/manual/en/control-structures.switch.php[/a]

new is for class.
[a href=\"http://sg.php.net/manual/en/function.get-class.php\" target=\"_blank\"]http://sg.php.net/manual/en/function.get-class.php[/a]

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#9 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 June 2006 - 05:25 AM

Do as in [a href=\"http://php.net/dowhile\" target=\"_blank\"]do-while[/a]. Once again I say RTFM!!!!!

#10 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 25 June 2006 - 09:23 AM

What is RTFM ?

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#11 paul2463

paul2463
  • Members
  • PipPipPip
  • Advanced Member
  • 955 posts
  • LocationUK

Posted 25 June 2006 - 09:48 AM

[!--quoteo(post=387714:date=Jun 25 2006, 04:23 AM:name=hackerkts)--][div class=\'quotetop\']QUOTE(hackerkts @ Jun 25 2006, 04:23 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
What is RTFM ?
[/quote]


it stands for READ THE MANUAL
you cannot affect the past but you can ruin a perfectly good present by worrying about the future

*********************************************************************
The <A HREF="http://www.php.net/d...php">MANUAL</A> is actually a useful resource

#12 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 25 June 2006 - 10:18 AM

Most of those keywords you have stated are reserved words. [a href=\"http://www.php.net/manual/en/reserved.php\" target=\"_blank\"]Click here[/a] to read up on them. It wont explain what each one does but it'll show where you use them.

Also any one that states RTFM agian will be given a warning instantly, If you want someone to read the manual point them to it.

#13 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 25 June 2006 - 11:54 AM

it stands for READ THE MANUAL


Thanks for the explaination..

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users