> Me too (tm)! This is a job for a good editor, with automatic name
> completion or abbreviation expansion. This gives you the convenience of
> shortcuts when coding, together with the full standard names when reading
> the source code at a later date!
I think we've missed the point of my origin
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 03 November 2004 19:40, Pablo Gosse wrote:
> [snip]Klaus Reimer wrote:
> > Murray @ PlanetThoughtful wrote:
> > > function asl($val){
> > > function mfr(&$rset){
> >
> > This ma
Another code snippet I use quite regularly builds a form select list from a
delimited string.
function displayFormSelect($selvals, $selname, $val=''){
$optval = explode(",", $selvals);
$retval = "";
foreach ($optval as $key => $value){
$retval .= "";
Greg Donald wrote:
Murray wasn't asking for your opinions on _his_ code, he was asking
what code _you_ had that you couldn't live without, code that makes
your life easier when reused from project to project.
Ok then. Here comes mine (but not in form of source code. If someone is
interested, mail
this is not a code "snippet" just a class that i have re-used about
a 100 times. It is for authenticating users via a passwd file or mysql.
Hope it will help someone ... also , if you improve it please email me
the changes :)
http://mohadib.openactive.org/web_editor/AuthTool.class.php.txt
[snip]Extending PHP to have "shorthand" functions? Was that
irony?[/snip]
It most certainly was irony, Klaus.
I was merely trying to illustrate the point that writing a custom
function which does EXACTLY the same thing as a built in function is
redundant. A number of functions within php do have
ime?"
-TG
> -Original Message-
> From: Greg Donald [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 03, 2004 2:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] 'Code Snippets' you couldn't live without
>
>
> On Wed, 03 Nov 2004 20:22:14
Pablo Gosse wrote:
extra with the results to suit your needs, but as for just using
asl($val) instead of addslashes($val), well why not just extend the PHP
source to make asl() an actual alias to addslashes()?
Extending PHP to have "shorthand" functions? Was that irony? I hope so.
Having such shor
> snippets they couldn't live without when working on a PHP project. IE, the
> kind of re-usable bits and pieces that make your life a lot easier.
I hate always having to write queries for inserting and updating a db.
With this I can just name the form objects the same names as the
table fields a
TED]
Sent: Wednesday, November 03, 2004 10:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] 'Code Snippets' you couldn't live without
Hi All,
I'm curious to know what other members of the list think of as the code
snippets they couldn't live without when working on a PHP proj
Murray @ PlanetThoughtful wrote:
Hi All,
I'm curious to know what other members of the list think of as the code
snippets they couldn't live without when working on a PHP project. IE, the
kind of re-usable bits and pieces that make your life a lot easier.
For myself, I have an include file in which
On Wed, 03 Nov 2004 20:22:14 +0100, Klaus Reimer <[EMAIL PROTECTED]> wrote:
> This may be ok for private projects but otherwise I don't think it's a
> good idea to create "shorthand" functions.
Murray wasn't asking for your opinions on _his_ code, he was asking
what code _you_ had that you couldn'
[snip]Klaus Reimer wrote:
> Murray @ PlanetThoughtful wrote:
>> function asl($val){
>> function mfr(&$rset){
>
> This may be ok for private projects but otherwise I don't think it's a
> good idea to create "shorthand" functions. Other developers (and
> especially new developers beginning to work o
Murray @ PlanetThoughtful wrote:
function asl($val){
function mfr(&$rset){
This may be ok for private projects but otherwise I don't think it's a
good idea to create "shorthand" functions. Other developers (and
especially new developers beginning to work on the project) are getting
confused. The
On Thu, 4 Nov 2004 04:16:48 +1000, Murray @ PlanetThoughtful
<[EMAIL PROTECTED]> wrote:
> I'm curious to know what other members of the list think of as the code
> snippets they couldn't live without when working on a PHP project. IE, the
> kind of re-usable bits and pieces that make your life a lo
Hi All,
I'm curious to know what other members of the list think of as the code
snippets they couldn't live without when working on a PHP project. IE, the
kind of re-usable bits and pieces that make your life a lot easier.
For myself, I have an include file in which I define 'shorthand' functions
16 matches
Mail list logo