Search found 7 matches
- Mon Nov 16, 2009 2:16 pm
- Forum: Regex
- Topic: Matching URLs *not* inside [code] tags
- Replies: 2
- Views: 1616
Re: Matching URLs *not* inside [code] tags
Really? It seems like it'd be possible to do with Regular Expressions. I'll check out how PunBB does it, though. Thanks a lot! This should prove to be easier than figuring out a Regular Expression for it. Thank you, ridgerunner!
- Sun Nov 15, 2009 3:15 pm
- Forum: Regex
- Topic: Matching URLs *not* inside [code] tags
- Replies: 2
- Views: 1616
Matching URLs *not* inside [code] tags
In my script, URLs are automatically parsed into Anchored HTML links. I also have a [ code ] (I call it [raw] -- as in raw-text) that obviously used for when you don't want text to formatted. The problem is that URLs inside [raw] tags get automatically hyper-linked. So, how would I match URLs not in...
- Sun Mar 08, 2009 9:03 pm
- Forum: PHP - Code
- Topic: [Solved] Error Handling
- Replies: 3
- Views: 216
Re: Error Handling
I actually was returning the error-array (if you were to look about 2 or 3 lines above the line you posted). The problem was that I was placing a null-variable (known as $err) in the array when I was assigning all the errors to the $this->err[] array. Anyways, thanks a lot for your input, it may not...
- Sun Mar 08, 2009 2:52 pm
- Forum: PHP - Code
- Topic: [Solved] Error Handling
- Replies: 3
- Views: 216
[Solved] Error Handling
I've created a User-Registration Class that add users when all the correct parameters are met or returns an error when only some of the parameters are correctly met. The way I have it now, it only spits a single error at a time (so say you left two of the fields blank, it would only tell you that yo...
- Sun Dec 28, 2008 1:53 am
- Forum: PHP - Code
- Topic: Are Type-Casting and SetType similar?
- Replies: 5
- Views: 492
Re: Are Type-Casting and SetType similar?
Thanks for the clarification. That makes sense seeing as the first (invalid) method requires a constant not a string (as $type would considered to be).jshpro2 wrote:Nope.Goldeneye wrote: It's just a redundancy.Code: Select all
$type = 'int'; // invalid: $a = ( $type )'5a'; settype( $a, $type ); //valid
- Sun Dec 28, 2008 12:19 am
- Forum: PHP - Code
- Topic: Are Type-Casting and SetType similar?
- Replies: 5
- Views: 492
Re: Are Type-Casting and SetType similar?
http://ca3.php.net/manual/en/function.settype.php Alright, that's what I thought too. It's just a redundancy. Thanks :) Oh one more question (this is a bit of tangent): Say you have a session variable named 'key' ($_SESSION['key']) (which is to used SQL queries) and you assign it upon a one-time scr...
- Sat Dec 27, 2008 8:10 pm
- Forum: PHP - Code
- Topic: Are Type-Casting and SetType similar?
- Replies: 5
- Views: 492
Are Type-Casting and SetType similar?
I was just looking through the PHP Manual for ways to verify that my variables are strings, numbers, integers, etc. And came across Type-Casting. Then I came across the settype() function, and now I'm just curious, they do (essentially) the same thing, correct?