php-general Digest 30 Mar 2008 16:25:45 -0000 Issue 5376

Topics (messages 272299 through 272310):

Re: new lines in textareas?
        272299 by: Casey
        272300 by: TG
        272305 by: jeffry s

Google Pagerank script
        272301 by: Joey
        272307 by: Colin Guthrie
        272310 by: tedd

preg_replace_callback(), how to pass function argument/param?
        272302 by: Micky Hulse

auto generated PDF
        272303 by: Alain Roger
        272304 by: Per Jessen
        272306 by: Colin Guthrie

E-Library Software
        272308 by: Ali Reza Sajedi

Planet PHP broken?
        272309 by: Richard Heyes

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
On Sat, Mar 29, 2008 at 9:26 PM, Mary Anderson
<[EMAIL PROTECTED]> wrote:
> Hi all,
>     I have a php script which produces text which is to be displayed in
>  a textarea.  I have the wrap for the text area set to 'hard'.  I need to
>  have newlines inserted in the text.
>      "\n" and "<br>" don't work.  They just get quoted literally in the
>  text.  I suspect I need to use htmlspecialchars , but don't know what
>  special character to feed it.
>
>      Apologies if this should go to an HTML forum.  I checked several
>  archives and did not find anything useful.  (They tended to tell me to
>  put in \n or <br>!)
>
>      Thanks
>
>  Mary Anderson
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>

\n, or just a plain line break, should work.

<?php
 echo '<textarea>Hello,
My favorite color is blue.
Signed,
Me!';
?>

Should work.

-Casey

--- End Message ---
--- Begin Message ---
Is \n included literally because you're using single quotes for the variable?

$textdata = 'This is a test\nThis is the second line';

vs...

$textarea = "This is a test\nThis is the second line";

I would guess a lot of the pages you find are talking about what to do with 
the text after submitting through the textarea, not re-displaying with 
proper breaks when loading a page containing a text area that should have 
data.

-TG

----- Original Message -----
From: Mary Anderson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Sat, 29 Mar 2008 21:26:24 -0700
Subject: [PHP] new lines in textareas?

> Hi all,
>     I have a php script which produces text which is to be displayed in 
> a textarea.  I have the wrap for the text area set to 'hard'.  I need to 
> have newlines inserted in the text.
>      "\n" and "<br>" don't work.  They just get quoted literally in the 
> text.  I suspect I need to use htmlspecialchars , but don't know what 
> special character to feed it.
> 
>      Apologies if this should go to an HTML forum.  I checked several 
> archives and did not find anything useful.  (They tended to tell me to 
> put in \n or <br>!)
> 
>      Thanks
> 
> Mary Anderson


--- End Message ---
--- Begin Message ---
On Sun, Mar 30, 2008 at 2:07 PM, TG <[EMAIL PROTECTED]> wrote:

>
> Is \n included literally because you're using single quotes for the
> variable?
>
> $textdata = 'This is a test\nThis is the second line';
>
> vs...
>
> $textarea = "This is a test\nThis is the second line";
>
> I would guess a lot of the pages you find are talking about what to do
> with
> the text after submitting through the textarea, not re-displaying with
> proper breaks when loading a page containing a text area that should have
> data.
>
> -TG
>
> ----- Original Message -----
> From: Mary Anderson <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Date: Sat, 29 Mar 2008 21:26:24 -0700
> Subject: [PHP] new lines in textareas?
>
> > Hi all,
> >     I have a php script which produces text which is to be displayed in
> > a textarea.  I have the wrap for the text area set to 'hard'.  I need to
> > have newlines inserted in the text.
> >      "\n" and "<br>" don't work.  They just get quoted literally in the
> > text.  I suspect I need to use htmlspecialchars , but don't know what
> > special character to feed it.
> >
> >      Apologies if this should go to an HTML forum.  I checked several
> > archives and did not find anything useful.  (They tended to tell me to
> > put in \n or <br>!)
> >
> >      Thanks
> >
> > Mary Anderson
>

my client ask me about this problem 2 weeks ago. he want the text to
automatically
go to new line after user type until the end of the line. The only possible
solutions so
far is using wrap='hard' or wrap='soft'
eg: <textarea cols=10 rows=10 wrap=hard>
but wrap only work on IE & Netscape browser. Not working in firefox.
i guess i want to use javascript to do the text formatting. trigger the
javascript event
every time the user using the onchange event (i never try)..
i is quite complicated & i dont have much time working on it.
so i decided to tell him, it cannot be done :)

--- End Message ---
--- Begin Message ---
Hello All,

 

Does anyone have a link to source code for a pagerank script?

I want to provide this to users.

 

Thanks!

 

Joey

 

 

 


--- End Message ---
--- Begin Message ---
Joey wrote:
> Does anyone have a link to source code for a pagerank script?
> 
> I want to provide this to users.

Here's one:

$res = mysql_query('SELECT * FROM pages ORDER BY rank');


You should probably be a little more specific! Do you mean a script that
can access Google's webservices to find out the pagerank for a given URL?

Col


--- End Message ---
--- Begin Message ---
At 2:26 AM -0400 3/30/08, Joey wrote:
Hello All,

Does anyone have a link to source code for a pagerank script?

I want to provide this to users.


Sure, a few years ago I spent a considerable amount of time finding the code and here it is:

http://www.webbytedd.com/a/page-rank/index.php

It used to work, but now it doesn't.

Anyone care to tell me why it doesn't work anymore and how to fix it?

Cheers,

tedd


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Hi,

This is probably simple to answer for most of ya'll, but...

preg_replace_callback($f, 'mah_processTags', $text);

Besides the matches, how would I pass function args/param to mah_processTags()?

For example, I would like to do something like this:

preg_replace_callback($f, 'mah_processTags($arg1)', $text);
function mah_processTags($matches, $arg1) { ... }

Is this even possible? I just want to pass-in $arg1 along with the matches. :)

Possible?

Many thanks in advance!!!
Cheers,
Micky

--
Wishlist: <http://tinyurl.com/22xonb>
Switch: <http://browsehappy.com/>
BCC?: <http://snipurl.com/w6f8>
My: <http://del.icio.us/mhulse>

--- End Message ---
--- Begin Message ---
Hi,

i want to implement on my web portal electronic invoicing system.
basically data will be stored into PostgreSQL DB.

I would like to know if someone already have experiences with such feature
or where could i find some tutorials or help about this topic.

Concretly, user will buy some products/services online and i would like to
send him a PDF invoice via email.

is there a PDF module under PEAR or directly under PHP ?

thanks a lot,

-- 
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

--- End Message ---
--- Begin Message ---
Alain Roger wrote:

> Concretly, user will buy some products/services online and i would
> like to send him a PDF invoice via email.
> 
> is there a PDF module under PEAR or directly under PHP ?

So far I've seen two approaches to this:  

1. LaTeX to PDF
2. Openoffice to PDF.

We use method #2. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
Per Jessen wrote:
> Alain Roger wrote:
> 
>> Concretly, user will buy some products/services online and i would
>> like to send him a PDF invoice via email.
>>
>> is there a PDF module under PEAR or directly under PHP ?
> 
> So far I've seen two approaches to this:  
> 
> 1. LaTeX to PDF
> 2. Openoffice to PDF.
> 
> We use method #2. 


pdflib from PECL
http://pecl.php.net/package/pdflib/

Not pear so not pure PHP.

A pure PHP alternative is:

http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf

HTHs

Col


--- End Message ---
--- Begin Message ---
Hello,

I am looking for an open source php based E-Library sofware.

Could anybody help?

Regards

Ali

--- End Message ---
--- Begin Message ---
Hey,

As the subject says really. Last thing it has seems to be "PEAR on a Shared Host" dated the start of the 27th.

--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

--- End Message ---

Reply via email to