Validus … talkin bout <code> n sh!t

14Sep/110

php split()

Posted by Joey

Bit behind the eight ball, but the php function split(string $pattern, string $string) is depreciated. Instead use explode(string $delimiter, string $string)

1

For more info… http://php.net/manual/en/function.explode.php

Filed under: PHP No Comments
15Aug/110

creating mutli line strings in c#

Posted by Joey

Great concept, if you’re like me and hate having really really long one line strings… e.g. a query this is the solution for you.

Example, you may have the following… which won’t work.
1

Instead of adding ” something ” + (new line) + ” something else “… Continue reading

Filed under: C# No Comments
2Aug/110

c# compare multiple strings

Posted by Joey

Seems pretty straight forward, but I totally forgot how to compare a list of strings against another string. So here’s the code!

1… Continue reading

Filed under: C# No Comments
1Aug/110

PHP Single vs Double quotes

Posted by Joey

Had a question yesterday…

Is it bad practice to use double quotes (“) for almost all my expressions in…well, anything? As opposed to a single quote? I know there’s a difference between the two and when to use it, but is it just generally better practice to use single instead of double? Most developers I see use single quotes for almost everything.

Quick answer, there’s no… Continue reading

Filed under: PHP No Comments