cvs: php-master-web /fetch countries.php

From: Date: Sun, 03 Mar 2002 19:27:46 +0000
Subject: cvs: php-master-web /fetch countries.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-8927@lists.php.net to get a copy of this message
jimw Sun Mar 3 14:27:46 2002 EDT Modified files: /php-master-web/fetch countries.php Log: oops, some country names have apostrophes Index: php-master-web/fetch/countries.php diff -u php-master-web/fetch/countries.php:1.1 php-master-web/fetch/countries.php:1.2 --- php-master-web/fetch/countries.php:1.1 Sun Mar 3 13:51:04 2002 +++ php-master-web/fetch/countries.php Sun Mar 3 14:27:46 2002 @@ -11,7 +11,7 @@ if ($res) { echo "<?php\n\$COUNTRIES = array(\n"; while ($row = @mysql_fetch_array($res)) { - echo "'$row[id]' => '$row[name]',\n"; + echo "'$row[id]' => '", addslashes($row['name']), "',\n"; } echo ");\n"; echo "?>\n";

« previous php.mirrors (#8927) next »