Web Programming for Business by Paper David

Web Programming for Business by Paper David

Author:Paper, David
Language: eng
Format: epub
ISBN: 9781136671890
Publisher: Taylor and Francis
Published: 2015-06-04T16:00:00+00:00


Figure 4.19 Output from ‘validate_regex’ Class Showing Valid and Invalid Last Names

Continue by validating addresses (line 10) (Figure 4.20).

 1 <?php

 2 // File call_validate_regex.php

 3 require_once 'validate_regex.php';

 4 $addrs = array(

 5 '665 W. North # 5', '_1234?',

 6 '987 North Pine, Ste. 7', '_622 444 7');

 7 $validate = new validate_regex();

 8 foreach($addrs as $address)

 9 {

10 if($validate->get_valid_address($address))

11 { echo "Valid Address: " . $address; }

12 else

13 { echo "Invalid Address: " . $address; }

14 echo "<br />";

15 }

16 ?>



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.