473,394 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

extract(): First argument should be an array

below is the code i have
Expand|Select|Wrap|Line Numbers
  1.  $values['client'];
  2. $name2 = extract(' - ', $values['client']);
  3.  
  4. $values['client'] contains names which are retrieved from the database. Ex: $values['client'] = "BBC - Jordan";
I want to catch the first part and pass it to retrieve another record but i am getting an error as extract(): First argument should be an array.
Oct 23 '13 #1
1 1219
Rabbit
12,516 Expert Mod 8TB
What do you think extract does? The first argument needs to be an array, you're giving it a string. There's a pretty clear error message. From what I can see, you misunderstand what extract is doing. Here's a link to the PHP manual. http://php.net/manual/en/function.extract.php
Oct 23 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: arotem | last post by:
Hi, I am trying to call an unbound method (PrintInput) with the object instance as the first argument but getting the following error: "TypeError: unbound method PrintInput() must be called with...
3
by: Goh, Yong Kwang | last post by:
I'm currently using execvp() for my lab program and I realise that the first argument (args) I pass to execvp is always not passed to the file ("/bin/ls") being executed. I'm using gcc compiler...
5
by: jcrouse | last post by:
I have the following code: Dim MyStartupArguments() As String MyStartupArguments = System.Environment.GetCommandLineArgs UBound(MyStartupArguments) RomName =...
22
Geeza1973
by: Geeza1973 | last post by:
Below is the code I have: <?php include("db.php"); mysql_connect ($host, $user, $pass); mysql_select_db ($database); $result = mysql_query ("SELECT * FROM `highscore` ORDER BY score DESC LIMIT...
5
by: brightbeat451 | last post by:
I tried this char * something; sprintf(something, ....) but it didn't work. can I only use
2
by: p655279 | last post by:
Dear All, Does anyone know how to extract first business date of each month in a DB2 SQL? many many thanks
3
by: dmalhotr2001 | last post by:
Hi, For string extraction function in vb, if I feed in a paragraph, how do I extract the first sentence of that paragraph. Thanks :D
6
by: ekasII | last post by:
Somehow python will not let me open a file, and write an integer into this file. My script goes something like this: self.l__c = 4 self.l__calculation = (self.status) #at this point, self.status...
0
by: cvoce | last post by:
Hi, I am trying to go off and collect data on a regular basis, which can take time, then once I have collated it all, use it in the GUI thread. The data can change - sometimes only 1 message,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.