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.

Post Posted: May 13th, 2010, 2:19 pm

Every query you have that has a section which was built using data submitted by the user, needs to be screened. Every query, SELECT, INSERT, DELETE, etc. Every one. Data submitted by the user includes (but isn't limited to) $_GET, $_POST, and $_COOKIE variables, as well as variables that you might ...

Post Posted: May 13th, 2010, 12:10 pm

So up until this point I have been using mysql_real_escape_string() to clean incoming data before it hits the DB. But, when looking back at my code I have noticed for some reason I only used it when the sql statement was inserting data. Now I have looked at this example and they use mysql_real_escap...

Post Posted: October 21st, 2009, 9:50 pm

Hey all! I am currently looking for a developer to hire on contract basis, with experience using the Google Maps API to debug a map for a client. My delivery date is October 30th, so I need some one fast. If you are interested please send me your hourly rate and a few example maps you have done to j...

Post Posted: August 31st, 2009, 7:46 am

mk27 - thanks for your help. I am going to try and implement this in a moment.

Post Posted: August 30th, 2009, 4:50 pm

JoeBert - Thanks for your reply, however, i am completely lost now! LOL! Maybe it might help if you could show me where in your solution the code prints with
Code: [ Select ]
document.write(TextState+'<br/>');
Then I might have a better idea following what you are saying and working it in to m...

Post Posted: August 30th, 2009, 3:34 pm

So some of you might already be aware that I am writing a XML parser in JavaScript. Things are going ok, but I need to parse each item at like a 5 second interval. Here is the for loop i am using: [code=javascript] for (var i = 0; i < xmlrows.length; i++) { var xmlrow = xmlrows[i]; va...

Post Posted: August 27th, 2009, 6:59 pm

Lets assume that I want to parse the following XML with JavaScript: fruit.xml: [code=xml] <fruit> <apple>red</apple> <banana>yellow</banana> <orange>orange</orange> <citrus> <orange>orange</orange> <lemon>yellow</lemon> <...

Post Posted: August 27th, 2009, 6:14 pm

The answer is:
Code: [ Select ]
499+499+499+499=1996

Post Posted: July 30th, 2009, 9:48 am

Ok cool, i just realized though that I actually need to do this on 2 sites. The second one i need to redirect at a directory level. In other words, I want to redirect oldsite.com/blog/ to newsite.com/blog/ and keep the content in the root of oldsite.com/ where it is. Would the redirect for that look...

Post Posted: July 30th, 2009, 8:58 am

I did a bit more research and came across this

Code: [ Select ]
Rewriterule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]


Will this work? I don't really have anyway to test this..its kinda like I have to get it right the first time!

Post Posted: July 30th, 2009, 8:55 am

I am moving a site to a new domain soon and would like to do a 301 redirect to maintain SEO quality backlinks. The URL structures on the new domain will be exactly like the old with a different domain name. This site has close to a thousand or so pages so I am not really interested in writing a new ...

Post Posted: June 26th, 2009, 7:10 am

Ha, I had never thought of that, it might be funny to only use IE4 on everything you do for that very reason! btw, thanks for the list!

Post Posted: June 19th, 2009, 9:15 pm

Have a list of user agents that I can add to a pool?

Post Posted: June 12th, 2009, 7:19 am

Thanks man! I love you like a fat kids loves cake!

Post Posted: June 11th, 2009, 12:00 pm

I just asked matt cutts that same exact question! See: http://twitter.com/joehall/status/2107546769 I haven't gotten a response yet.
  • Sort by
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.