Programming: All Listings RSS

Filter listings...
http://www.smarty.net/

www.smarty.net

Smarty is a template engine for PHP. This site has an active forum.

Category:Forums
Visited65
http://stackoverflow.com/questions/5749415/search-for-a-string-or-part-of-string-in-php

stackoverflow.com/questions/5749415/search-for-a-string-or-p...

I am doing a very small online store application in PHP. So I have an array of maps in PHP. I want to search for a string (a product) in the array. I looked at array_search in PHP and it seems that it only looks for exact match. Do you guys know a bett ...

Category:Snippets
Visited137
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://regexr.com/

regexr.com

Online expression builder for RegEX to help writing htaccess and other programming stuff.

Category:Tools
Visited77
http://tools.devshed.com/

tools.devshed.com

Webmaster Tools, Developer Tools, Programming Tools. There are a lot useful tools here.

  • Base64 Encoding
  • Browser Settings
  • CSS Coder
  • CSS Navigation Menu
  • Datetime Converter
  • DHTML Tooltip
  • ...

    Category:Tools
    Visited118
http://www.regexlib.com/

www.regexlib.com

Regular Expression Library provides a searchable database of regular expressions.  Users can add, edit, rate, and test regular expressions.

Category:Websites
Visited74
http://www.smarty.net/docsv2/en/chapter.debugging.console.tpl

www.smarty.net/docsv2/en/chapter.debugging.console.tpl

There is a debugging console included with Smarty. The console informs you of all the included templates, assigned variables and config file variables for the current invocation of the template. A template file named debug.tpl is included with the dist ...

Visited107
http://www.smarty.net/docs/en/api.get.template.vars.tpl

www.smarty.net/docs/en/api.get.template.vars.tpl

getTemplateVars() — returns assigned variable value(s)

Visited111