Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
Scope of my Variable July 11, 2013 11:05PM |
Registered: 11 years ago Posts: 106 Rating: 0 |
Language: PHP$string="this x is what I am looking for"; $Answer=strlen($string); $myAray = array("z","x","t"); foreach($myAray as $Item){ $ItemFind = strpos($string,$Item); echo $ItemFind ; //echo "window.alert($Answer)"; if($Answer>$ItemFind){ $Answer =$ItemFind; echo $Answer; } } $Answer =$Answer+1; echo $Answer
Re: Scope of my Variable July 12, 2013 08:48AM |
Registered: 11 years ago Posts: 31 Rating: 0 |
Re: Scope of my Variable July 12, 2013 09:07AM |
Registered: 11 years ago Posts: 106 Rating: 0 |
Re: Scope of my Variable July 12, 2013 09:41AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Language: PHPif($Answer>$ItemFind){
Re: Scope of my Variable July 12, 2013 01:14PM |
Registered: 11 years ago Posts: 106 Rating: 0 |
Re: Scope of my Variable July 12, 2013 02:08PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: Scope of my Variable July 12, 2013 05:35PM |
Registered: 11 years ago Posts: 106 Rating: 0 |
Language: PHPif(strpos($string,$leter)!=false){ }
Language: PHP$Answer = "The first leter is seen in position: ".$Answer +1;
Language: PHP$Answer = "The first leter from list is seen in position: ".($Answer +1);
Re: Scope of my Variable July 22, 2013 01:36PM |
Registered: 11 years ago Posts: 14 Rating: 0 |