
Asgardien
Members-
Posts
13 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
Asgardien's Achievements

Newbie (1/5)
0
Reputation
-
How would i pass the returned xml aray to the word press db ?. is this even possible ?
-
Your a Star Barand that worked. Thanks a lot for all the help and time.
-
error below, just to clarify , just a point i close the curl call after all the code 'array ( 0 => array ( \'id\' => \'4024\', \'town_name\' => \'BIRKENHEAD\', \'active\' => \'1\', ), 1 => array ( \'id\' => \'4023\', \'town_name\' => \'CHESTER\', \'active\' => \'1\', ), 2 => array ( \'id\' => \'3859\', \'town_name\' => \'ELLESMERE PORT\', \'active\' => \'1\', ), 3 => array ( \'id\' => \'4065\', \'town_name\' => \'FLINT\', \'active\' => \'1\', ), 4 => array ( \'id\' => \'3961\', \'town_name\' => \'LIVERPOOL\', \'active\' => \'1\', ), 5 => array ( \'id\' => \'3962\', \'town_name\' => \'MOLD\', \'active\' => \'1\', ), 6 => array ( \'id\' => \'3958\', \'town_name\' => \'ST HELENS\', \'active\' => \'1\', ), )' ( ! ) Warning: array_keys() expects parameter 1 to be array, string given in D:\wamp\www\php8462.tmp on line 34 Call Stack # Time Memory Function Location 1 0.0005 366168 {main}( ) ..\php8462.tmp:0 2 0.1254 373096 array_keys ( ) ..\php8462.tmp:34 ( ! ) Warning: join() [function.join]: Invalid arguments passed in D:\wamp\www\php8462.tmp on line 36 Call Stack # Time Memory Function Location 1 0.0005 366168 {main}( ) ..\php8462.tmp:0 2 0.1255 373400 join ( ) ..\php8462.tmp:36 ( ! ) Warning: Invalid argument supplied for foreach() in D:\wamp\www\php8462.tmp on line 37 Call Stack # Time Memory Function Location 1 0.0005 366168 {main}( ) ..\php8462.tmp:0 PHP Warning: array_keys() expects parameter 1 to be array, string given in D:\wamp\www\php8462.tmp on line 34 PHP Stack trace: PHP 1. {main}() D:\wamp\www\php8462.tmp:0 PHP 2. array_keys() D:\wamp\www\php8462.tmp:34 PHP Warning: join() [function.join]: Invalid arguments passed in D:\wamp\www\php8462.tmp on line 36 PHP Stack trace: PHP 1. {main}() D:\wamp\www\php8462.tmp:0 PHP 2. join() D:\wamp\www\php8462.tmp:36 PHP Warning: Invalid argument supplied for foreach() in D:\wamp\www\php8462.tmp on line 37 PHP Stack trace: PHP 1. {main}() D:\wamp\www\php8462.tmp:0
-
sorry about that, i pass the curl request so : $data = curl_exec ($ch);
-
I ran the code you posted and it worked returning the required search value, So i am thinking it must be something to do with the way it is brought back via the Curl call thats is causing it to fail
-
still brings back the same error. The array comes from a CURL call, would this make a difference ?
-
Barand thanks for all your help with this, the array has tha structur that i gave but there is more data ,"Fields"in the array than i posted there could be upto 27 fields in each array. just cant post them.
-
still getting the error below, have 2 days RR now so can crack on with this hopefully ( ! ) Warning: array_keys() expects parameter 1 to be array, string given in D:\wamp\www\php2B65.tmp on line 19 Call Stack # Time Memory Function Location 1 0.0007 367376 {main}( ) ..\php2B65.tmp:0 2 0.3063 374368 array_keys ( ) ..\php2B65.tmp:19 ( ! ) Warning: join() [function.join]: Invalid arguments passed in D:\wamp\www\php2B65.tmp on line 21 Call Stack # Time Memory Function Location 1 0.0007 367376 {main}( ) ..\php2B65.tmp:0 2 0.3065 374624 join ( ) ..\php2B65.tmp:21 ( ! ) Warning: Invalid argument supplied for foreach() in D:\wamp\www\php2B65.tmp on line 22 Call Stack # Time Memory Function Location 1 0.0007 367376 {main}( ) ..\php2B65.tmp:0
-
Still getting error;s when i run the code, the Data variable does hold the array data, this may be just me having a boild brain, in the 30'sº today and i get sunburn when it goes over 18º
-
thanks again for the reply, will have to put this on hold for 24 hrs no pc were im going for a bit
-
thanks for the reply Barand. used yor code and recieved a "Warning: array_keys() expects parameter 1 to be array, string given in D:\wamp\www\~test2.php on line 19 Call Stack: 0.0013 329976 1. {main}() D:\wamp\www\~test2.php:0 0.2389 336912 2. array_keys() D:\wamp\www\~test2.php:19 Warning: join(): Invalid arguments passed in D:\wamp\www\~test2.php on line 21 Call Stack: 0.0013 329976 1. {main}() D:\wamp\www\~test2.php:0 0.2390 337008 2. join() D:\wamp\www\~test2.php:21 Warning: Invalid argument supplied for foreach() in D:\wamp\www\~test2.php on line 22 Call Stack: 0.0013 329976 1. {main}() D:\wamp\www\~test2.php:0 Any ideas ?
-
thanks for the quick replys, but i fear i asked the question incorrectly (too long in the field what i actually need to do is search through the array for a given value then return the whole value. ie some one searches for a town name and gets all entrys returned with that town name value. Sorry for the misleading first post.
-
Hi guys I have been tasked by my c.o to finnish a project and need some help. I have an array that is returned from a CURL reqest to one of the Reg servers. all i need to do is be able to search through the array and return the data. The example below is the same formate as the array i recieve data is fictional. any help will be appreciated. array ( 0 => array ( 'id' => '4024', 'town_name' => 'BIRKENHEAD', 'house_number' => '1', 'address1' => 'Woodford Road', 'address2' => '', 'town' => 'BIRKENHEAD', 'county' => '', 'postcode' => 'CH62 1AZ', 'reference' => 'A7', 'active' => '1', ), 1 => array ( 'id' => '4023', 'town_name' => 'CHESTER', 'house_number' => '1', 'address1' => 'Woodford Road', 'address2' => '', 'town' => 'BIRKENHEAD', 'county' => '', 'postcode' => 'CH62 1AZ', 'reference' => 'A7', 'active' => '1', ), 2 => array ( 'id' => '3859', 'town_name' => 'ELLESMERE PORT', 'house_number' => '1', 'address1' => 'Woodford Road', 'address2' => '', 'town' => 'BIRKENHEAD', 'county' => '', 'postcode' => 'CH62 1AZ', 'reference' => 'A7', 'active' => '1', ), 3 => array ( 'id' => '4065', 'town_name' => 'FLINT', 'house_number' => '1', 'address1' => 'Woodford Road', 'address2' => '', 'town' => 'BIRKENHEAD', 'county' => '', 'postcode' => 'CH62 1AZ', 'reference' => 'A7', 'active' => '1', ),