Search found 312 matches

Actual Results

Post Posted: October 12th, 2011, 8:53 am

Oh and as a side note, I am talking about PHP here, sorry! :)

Post Posted: October 12th, 2011, 8:49 am

Lets say I have an array like so:
Code: [ Select ]
Array ( [0] => apple [1] => pear [2] => apple [3] => orange [4] => pear [5] => apple )
And I want to print it like so: apple - 3 pear - 2 orange - 1 How would one do that? Do I need to lo...

Post Posted: January 30th, 2011, 8:31 am

in your htaccess file put something like: [code] Options +FollowSymlinks RewriteEngine on redirect 301 /upper_subcat.php?id=Ng==&cat_id=Mg== http://www.YourDomain.com/index.html redirect 301 /upper_subcat.php?id=Ng==&cat_id=OA== http://www.YourDomain.com/i...

Post Posted: January 30th, 2011, 8:26 am

I had a simular issue recently, and I had to write a series of IF statements. It wasn't very clean, but it worked.

Post Posted: January 30th, 2011, 8:16 am

I am trying to write a script that deletes all the files for a directory called "cache". My plan is to get this working and then setup a cronjob to run every hour so my server doesn't get filled up with wasted crap. So, anyways, heres what I have so far, and for some reason its not working...

Post Posted: August 11th, 2010, 11:57 am

spork wrote:
I'm confused; the loop I provided creates the exact structure you indicated.

yah, I see that now. My bad, and thanks a ton.

Post Posted: August 11th, 2010, 11:52 am

You can push entries onto the end of an array by simply assigning to the array with an empty index:
PHP Code: [ Select ]
$data = array(); foreach ($x as $value) { $data[] = array($value[0], $value[1], $value[2], $value[3]); }
oh, wait, my bad spork, I see what you are ...

Post Posted: August 11th, 2010, 11:50 am

You can push entries onto the end of an array by simply assigning to the array with an empty index:
PHP Code: [ Select ]
$data = array(); foreach ($x as $value) { $data[] = array($value[0], $value[1], $value[2], $value[3]); }
Yeah, that will work to create a normal arr...

Post Posted: August 11th, 2010, 11:27 am

So I have a loop that cycles through some data that I am pulling from an API. Whats the best way to create a multidimensional array with it? In the past I just make the array with array_push() but I am not sure how to do the same with multidimensional arrays. The array that I need to build is below ...

Post Posted: July 20th, 2010, 7:37 am

So, I am working with an API that outputs dates like this: 2010-07-20T13:57:11+0000 But my application requires that dates be in RFC822 format. Therefore I am trying to convert like so...
PHP Code: [ Select ]
<?php $date = date(DATE_RFC822, $date_string); ?>
However, this outputs the date as: Wed, 31 De...

Post Posted: June 29th, 2010, 11:49 am

AWESOME! GROUP BY title works like a charm! Thanks!

Post Posted: June 29th, 2010, 11:37 am

So, I have a MySQL table that holds ZIP codes, City, and State names. I want to list all the cities for each state, however, because many times there is more than one ZIP for each city I am having trouble listing each city only one time each. You can see my code below. I have tried using array_uniqu...

Post Posted: June 15th, 2010, 1:26 pm

Thanks a ton Spoof! For your hospitality. Samuele L Jackson is pleased.


Image

Post Posted: June 15th, 2010, 10:50 am

I am currently rewriting URLs with a htaccess file to create cleaner URLs. Here is my htaccess file:
Code: [ Select ]
Options +FollowSymlinks RewriteEngine on RewriteRule ^([a-zA-Z0-9]+)/$ /page.php?s=$1 RewriteRule ^([a-zA-Z0-9]+)$ /page.php?s=$1
With this regex I am able to h...

Post Posted: May 13th, 2010, 3:15 pm

Oh, I see, so the attacker might spoof the header.....never thought of that.
  • Sort by
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.