From: Zak Greant <zak@mysql.com>
To: arun kv <arun@library.iisc.ernet.in>
Cc: PGSQL <pgsql-php@postgresql.org>
Subject: Re: link problem
Date: 28 Feb 2002 03:22:39 -0700
Message-ID: <1014891759.13821.528.camel@linux> (raw)
In-Reply-To: <Pine.BSO.4.21.0202281226290.23506-100000@library.iisc.ernet.in>
References: <Pine.BSO.4.21.0202281226290.23506-100000@library.iisc.ernet.in>
On Thu, 2002-02-28 at 00:02, arun kv wrote:
>
>
> hello sir,
> i have printed the contents of a database on a table using php. how
> to give link from each content of cell to another page or file(like
> pdf). table in php is been created using printf() statement and i am
> unable to insert code to give link for whatever i print.
> thanx in advance
> Arun
Hi Arun,
You should review the printf and sprintf documentation. It is a bit
daunting at first, but makes sense after a bit of work.
To answser your question as best I can without seeing source code,
here is one way to make a link using a printf statement
$link = "http://www.php.net/";;
$text = "PHP Website";
printf ('<a href="%s">%s</a>', $link, $text);
Notice that the first %s is replaced with the value of $link,
while the second %s is replaced with the value of $text.
It looks like you are just getting started with PHP - you can
find a lot of helpful resources at http://www.php.net/support.php
Good Luck and happy PHPing!
--
Zak Greant
MySQL Advocate
PHP Quality Assurance Team
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: zak@mysql.com, arun@library.iisc.ernet.in
Subject: Re: link problem
In-Reply-To: <1014891759.13821.528.camel@linux>
References: <Pine.BSO.4.21.0202281226290.23506-100000@library.iisc.ernet.in> <1014891759.13821.528.camel@linux>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox