redarrow Posted June 24, 2006 Share Posted June 24, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/ Share on other sites More sharing options...
AndyB Posted June 24, 2006 Share Posted June 24, 2006 um, tried the manual? It explains most things and has examples.PS - watch the spelling :) Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49211 Share on other sites More sharing options...
redarrow Posted June 25, 2006 Author Share Posted June 25, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49218 Share on other sites More sharing options...
kenrbnsn Posted June 25, 2006 Share Posted June 25, 2006 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 Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49269 Share on other sites More sharing options...
redarrow Posted June 25, 2006 Author Share Posted June 25, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49270 Share on other sites More sharing options...
trq Posted June 25, 2006 Share Posted June 25, 2006 rtfm!!! Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49278 Share on other sites More sharing options...
redarrow Posted June 25, 2006 Author Share Posted June 25, 2006 [!--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 doi got meny books i can not find it ok cheers. Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49280 Share on other sites More sharing options...
hackerkts Posted June 25, 2006 Share Posted June 25, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49282 Share on other sites More sharing options...
trq Posted June 25, 2006 Share Posted June 25, 2006 Do as in [a href=\"http://php.net/dowhile\" target=\"_blank\"]do-while[/a]. Once again I say RTFM!!!!! Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49287 Share on other sites More sharing options...
hackerkts Posted June 25, 2006 Share Posted June 25, 2006 What is RTFM ? Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49325 Share on other sites More sharing options...
paul2463 Posted June 25, 2006 Share Posted June 25, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49327 Share on other sites More sharing options...
wildteen88 Posted June 25, 2006 Share Posted June 25, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49330 Share on other sites More sharing options...
hackerkts Posted June 25, 2006 Share Posted June 25, 2006 [quote]it stands for READ THE MANUAL[/quote]Thanks for the explaination.. Quote Link to comment https://forums.phpfreaks.com/topic/12834-php-statement-help-cheers-thank-you/#findComment-49342 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.