Hello,
I would like to ask you for help. This days I am trying to build one of my
applications. But I have problem which stopped me. I have folder whit php
files like connect.php, delete.php etc. These files contains classes named
the same as files. So in file connect.php is class Connect. These
I'm not sure I've understood you correctly, but you may try something
like the following primitive autoloader (I didn't debug it, it's just
an example):
class Base
{
protected $_path = '';
public function construct($base_path)
{
$this-_path = $base_path;
}
public
On 11-12-15 02:50 AM, Ross McKay wrote:
On Wed, 14 Dec 2011 07:59:46 -0500, Rick Dwyer wrote:
Can someone tell me which of the following is preferred and why?
echo a style='text-align:left;size:14;font-weight:bold' href='/
mypage.php/$page_id'$page_name/abr;
echo a
Another nice way would be sprintf. So your string really is just a string
and nothing more.
I don't know how it would affect performance, but just for the eye I find
it much simpler.
echo sprintf(a style='text-align:left;size:**14;font-weight:bold'
href='/mypage.php/%d'%s/abr, $page_id,
Assuming you want to make things unique based on the contact_first_name
field,
how would you decide which record to keep? The first one you run in to, the
last one you come across, or some other criteria?
The unique field is actually the contact_id.
Marc
--
PHP General Mailing List
On 12/15/2011 01:05 PM, Alex Pojarsky wrote:
I'm not sure I've understood you correctly, but you may try something
like the following primitive autoloader (I didn't debug it, it's just
an example):
class Base
{
protected $_path = '';
public function construct($base_path)
{
On 12/14/2011 11:50 PM, Ross McKay wrote:
On Wed, 14 Dec 2011 07:59:46 -0500, Rick Dwyer wrote:
Can someone tell me which of the following is preferred and why?
echo a style='text-align:left;size:14;font-weight:bold' href='/
mypage.php/$page_id'$page_name/abr;
echo a
On 12/15/2011 6:24 AM, Marc Guay wrote:
Assuming you want to make things unique based on the contact_first_name
field,
how would you decide which record to keep? The first one you run in to, the
last one you come across, or some other criteria?
The unique field is actually the contact_id.
Give it a try, should do what you are wanting.
Hi Jim,
I appreciate your dedication to this problem but it was solved 2 days ago! :)
Thanks
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Dec 14, 2011, at 12:09 PM, Peter Ford wrote:
With respect to tedd and Al, you've misread the question: the important
PHP-related bit is about whether to embed variables in double-quoted strings
or to concatenate them. These are only two of the options, and each has it's
pros and cons.
Jim Lucas wrote:
I second this example, with one minor change, I would add '{' and '}' around
variables.
echo HTML
a style=text-align:left;size:14;font-weight:bold
href=/mypage.php/{$page_id}{$page_name}/abr
HTML;
This works for $variables, $objects, and variable functions calls. But
11 matches
Mail list logo