Curly Bracket Delimeters.


Posted on 16th Feb 2014 07:03 pm by admin

I'd always believed that the starting and ending delimeters in preg_ functions had to be the same character, but recently discovered that you can use the curly brackets.

Example:
Code: [Select]if(preg_match('{[0-9]}', $input)) {
I was just wondering if there was any disadvantage/advantage of using this method?

No comments posted yet

Your Answer:

Login to answer
195 Like 29 Dislike
Previous forums Next forums
Other forums

extending tidy
I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy

fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw

Calander Basic Spript help
hi, just starting out with PHP and have the following script:

<?php
//This gets t

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Redirect not working after making a POST/GET
Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an

Prevention Help
How can I use PHP or any other language (feel free to move this thread) to prevent users doing scree

ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i

Form errors in an array
I'm processing a form and putting the errors in an array. empty($errors) doesn't seem to do the tric

Using Curl_multi for processing multiple URLs
Hi,

I am at a loss as to how to implement this. I would like to be able to automatically assi

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash