Jump to content

php statement help cheers thank you.


redarrow

Recommended Posts

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.
Link to comment
Share on other sites

this works

[code]
<?php

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

foreach($name AS $message);

echo $message;

?>
[/code]


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

$name="john";

$name as $mess;

echo $mess;

?>
[/code]
Link to comment
Share on other sites

[!--quoteo(post=387658:date=Jun 25 2006, 04:13 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Jun 25 2006, 04:13 AM) [snapback]387658[/snapback][/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
Link to comment
Share on other sites

[!--quoteo(post=387667:date=Jun 25 2006, 04:51 AM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 25 2006, 04:51 AM) [snapback]387667[/snapback][/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.
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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


it stands for READ THE MANUAL
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.