Usually PHP programmers need to build dynamic systems like scrools , random text , image galleries ...
First time i tryed to build some php features using javascript i faced some problems using php and javascript, concretely passing php variables to javascript fucntions by parameter.
On this article i´ll teach how i solve this problem.
First we will declare an JavaScript function . Let´s use the simple example above.
The function must be added between the tags head on the html code
Check how to add php code as parameters on javascript functions
And it´s done
Visit my php web site at www.revista-php.net , and add your questions
Regards
quinta-feira, 25 de outubro de 2007
sexta-feira, 19 de outubro de 2007
Detecting resolution with javascript
quinta-feira, 18 de outubro de 2007
How to load two ore more javascript functions
terça-feira, 16 de outubro de 2007
Solving the problem of getting MySQL last id
PHP ADVANCED :: The Singleton Design Pattern
Design Patterns , usually the GOF (gang of four) technics , are used to solve current problems on software modelling , generally on software engineering cases.
On this article i´ll tell you how to use Singleton Patterns on PHP, on current version PHP5.
This patterns is used when you can use just one single instance of the class you declared, and with it have an active instance without losing the link resource.
An example very useful is what happens on database connections , where , with just one instance you are able to make to rest of operations you need to.
The main properties to work on Singleton with PHP5 , are the private and static properties.
Understand his use are extremly important to build a good Singleton class code.
On the example right next , i´ll will build a simple class to use mysql and msqli according the project settings.
.... this article is beeing written, please stand by
On this article i´ll tell you how to use Singleton Patterns on PHP, on current version PHP5.
This patterns is used when you can use just one single instance of the class you declared, and with it have an active instance without losing the link resource.
An example very useful is what happens on database connections , where , with just one instance you are able to make to rest of operations you need to.
The main properties to work on Singleton with PHP5 , are the private and static properties.
Understand his use are extremly important to build a good Singleton class code.
On the example right next , i´ll will build a simple class to use mysql and msqli according the project settings.
.... this article is beeing written, please stand by
segunda-feira, 1 de outubro de 2007
I ´m very proud to announce the edition of first PHP magazine here in Portugal.
November will be out. This release will have only e-magazine version, but we are thinking on a printable version after.
Project will have collaboration of some prestidigitate PHP programmers as Manuel Lemos (PHP CLasses), José Fonseca (Yahoo UK), Zendrael (Anubis), Pablo dall Óglio (Tulip and Agata)... and a few more
Here goes the magazine cover for the next mount
Subscrever:
Mensagens (Atom)