hi all,
For example I have array like below:
$temp = array(array('north america', 'us', 'california'), array('north america', 'us', 'hawaii'), array('north america', 'canada', 'vancouver'), array('asia', 'singapore', 'orchard');
I need to filter it out. So i hope the result could be:
array
'north america' =>
array
'us' =>
array 0 =>string 'california'
1 =>string 'hawai'
'asia' =>
array
'singapore'
array 0 => string 'orchard'
Anyone could help me to sorf out the logic? I just cannot solve this question.
generating random codes
Hi guys n gals,I have a requirement to generate 250,000 unique codes...These codes are for a tracking service and will be stored in the database (table field has a unique index).Now I am working on
breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this: abcd@gmail.comfefef@mail.comfefefef@yahoo.comfewferf@mail.net...What I want to do is insert a paragraph after
filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I have a method, that is supposed to open a file and write to the file, but I am having issues. Each
i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individually ( I have a header.php and footer.php) but when I try to run then using a content page with the
Splitting Attributes
SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",
Email to a friend script problems
I have this send-to-a-friend script with 2 issues:1) When you open the form popup on a particular page, it includes the correct URL for that page (viewable on the popup form). But if you close it, go
why is it over writing
Code: $filepaths[] = $_FILES['new_image'];foreach ($filepaths as $filepath){$imagename = strtolower($filepath['name']);$charref = substr($imagename, 0, strrpos($imagename, '.'));
DateTimeZone::listIdentifiers headache
http://php.net/manual/en/datetimezone.listidentifiers.phpSo the documentation states that one can get locales by using the above mentioned function. However what I am trying to do is get country
split string
Hi all i have some names (imploded by comma):Code: toronto,paris,madridNow, i would obtain this result:Code: 'toronto','paris','madrid'How can i do? thanks
Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?here is my codeCode: [Select]echo "<select name='categories'>"; echo "<option