PHP: All Listings RSS

Filter listings...
http://stackoverflow.com/questions/1703320/remove-excess-whitespace-from-within-a-string

stackoverflow.com/questions/1703320/remove-excess-whitespace...

I receive a string from a database query, then I remove all HTML tags, carriage returns and newlines before I put it in a CSV file. Only thing is, I can't find a way to remove the excess white space from between the strings.

What would be the b ...

Category:Snippets
Visited173
http://www.hashbangcode.com/blog/uk-postcode-validation-function-php

www.hashbangcode.com/blog/uk-postcode-validation-function-ph...

Creating a function to validate UK postcodes would seem like a simple task, but there is a little more to it than checking the number of characters. In fact there are several different variants of UK postal codes, especially if you include BFPO and ove ...

Category:Snippets
Visited104
http://stackoverflow.com/questions/7454644/how-to-get-open-graph-protocol-of-a-webpage-by-php

stackoverflow.com/questions/7454644/how-to-get-open-graph-pr...

PHP has a simple command to get meta tags of a webpage (get_meta_tags), but this only works for meta tags with name attributes. However, Open Graph Protocol is becoming more and more popular these days. What is the easiest way to get the values of opg ...

Category:Snippets
Visited115
http://www.codingforums.com/php/34709-preg_match-syntax.html

www.codingforums.com/php/34709-preg_match-syntax.html

This thread shows you clearly how to use preg_match() and explains the different switches.

Category:preg_match()
Visited79
http://stackoverflow.com/questions/10201337/what-do-the-symbols-mean-in-preg-match

stackoverflow.com/questions/10201337/what-do-the-symbols-mea...

I have this expression in a code snippet i borrowed offline. It forces the new users to have a password that not only requires upper+lower+numbers but they must be in that order! If i enter lower+upper+numbers, it fails!

if ...

Category:preg_match()
Visited68
http://stackoverflow.com/questions/6228581/how-to-search-array-of-string-in-another-string-in-php

stackoverflow.com/questions/6228581/how-to-search-array-of-s...

Firstly, I want to inform that, what I need is the reverse of in_array PHP function.

I need to search all items of array in the string if any of them found, function will return true otherwise return false.

I need the fastest solution t ...

Category:Arrays
Visited90
http://docstore.mik.ua/orelly/webprog/pcook/ch04_12.htm

docstore.mik.ua/orelly/webprog/pcook/ch04_12.htm

TheProblem: You want to know if an array contains a certain value.

Category:Arrays
Visited95
http://stackoverflow.com/questions/5445668/checking-value-against-an-array-issue

stackoverflow.com/questions/5445668/checking-value-against-a...

Basically what I have is a function that accepts a single string $name as a variable, then it goes through and checks that variable against values in an array. If the variable is found in the array is returns TRUE. This function is called from within a ...

Category:Arrays
Visited99
http://stackoverflow.com/questions/14177170/php-string-to-array-check-spelling-back-to-string-preserving-special-charact

stackoverflow.com/questions/14177170/php-string-to-array-che...

I'm working on a custom spell checker (and learning as I go) that needs to do the following upon form submission:

  1. Convert the string submitted from textarea into an array of words.
  2. Search for each word in the array in the mysql ...

    Category:Arrays
    Visited93
http://ctrlq.org/beautifier/

ctrlq.org/beautifier/

With Code Beautifier, you can deobfuscate and reformat your source code written in JavaScript, HTML, CSS, PHP or other programming languages.

Category:Code Formatting
Visited150