[PHP] Processing HTML in mail form

2006-06-20 Thread Jonas Rosling
I've done the following code bellow for an e-mail form. But it handles the HTML tags as text. Is there anyway to get the HTML tags processed to form the mail? '. 'L-name: '.$lastname.''. 'Birth: '.$date_of_birth.''. 'Address: '.$post_address.''. 'Zip

[PHP] Skip first 4 array values

2006-06-09 Thread Jonas Rosling
Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] substring with numric values

2006-06-09 Thread Jonas Rosling
Is there any easy way to "trim" or pick out the none decimal values in a numric value? Like: 1,333 = 1 5,667 = 5 12,145 = 12 15,997 = 15 Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: [PHP] If value is odd or not

2006-06-02 Thread Jonas Rosling
-Ursprungligt meddelande- Fran: Eric Mol [mailto:[EMAIL PROTECTED] Skickat: den 2 juni 2006 15:34 Till: 'Jonas Rosling'; 'PHP List' Amne: RE: [PHP] If value is odd or not If ($var/2==round($var/2)){ // not odd }else{ // odd } Greetings, Eric Thanks (all)!

[PHP] If value is odd or not

2006-06-02 Thread Jonas Rosling
Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: [PHP] Converting text strings [out of topic a bit]

2006-05-30 Thread Jonas Rosling
-Ursprungligt meddelande- Från: tedd [mailto:[EMAIL PROTECTED] Skickat: den 30 maj 2006 15:10 Till: Jonas Rosling; PHP List Ämne: Re: [PHP] Converting text strings [out of topic a bit] At 10:17 AM +0200 5/30/06, Jonas Rosling wrote: >Hi all, >when my documents are using iso-8859-1

[PHP] More about converting text strings

2006-05-30 Thread Jonas Rosling
While I'm using UTF-8 as char set in my documents JavaScript messages works correct with none international characters. But not the PHP code with session_start(). I get the following error message: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /v

[PHP] Converting text strings [out of topic a bit]

2006-05-30 Thread Jonas Rosling
Hi all, when my documents are using iso-8859-1 (Latin 1) as char set I have some problems with displaying my JS dialogs correct with none international characters (å, ä and ö). Allthough this hasen't got anything to do with PHP, does anyone have any good idéas on how to solve this? Normaly I use U

SV: SV: [PHP] One works, but the other doesn't

2006-05-23 Thread Jonas Rosling
-Ursprungligt meddelande- Från: Barry [mailto:[EMAIL PROTECTED] Skickat: den 23 maj 2006 14:24 Till: php-general@lists.php.net Ämne: Re: SV: [PHP] One works, but the other doesn't > - > Well, I'm kind of a newbie at this. So you think this will solve my problem? Wh

SV: [PHP] One works, but the other doesn't

2006-05-23 Thread Jonas Rosling
-Ursprungligt meddelande- Från: chris smith [mailto:[EMAIL PROTECTED] Skickat: den 23 maj 2006 14:13 Till: Jonas Rosling Kopia: PHP List Ämne: Re: [PHP] One works, but the other doesn't On 5/23/06, Jonas Rosling <[EMAIL PROTECTED]> wrote: > -Ursprungligt meddelan

SV: [PHP] One works, but the other doesn't

2006-05-23 Thread Jonas Rosling
-Ursprungligt meddelande- Från: chris smith [mailto:[EMAIL PROTECTED] Skickat: den 23 maj 2006 13:38 Till: Jonas Rosling Kopia: PHP List Ämne: Re: [PHP] One works, but the other doesn't On 5/23/06, Jonas Rosling <[EMAIL PROTECTED]> wrote: > I find this problem very strange

[PHP] One works, but the other doesn't

2006-05-23 Thread Jonas Rosling
I find this problem very strange. I've got two parts of code (allmost the same) in different TD's with vars and arrays (with same name) but it's only the top code that gives result. I've allso tryied to rename the vars and TD's in the bottom without any luck. The only vars/arrays that I haven't min

SV: [PHP] Getting an advanced foreach to work

2006-05-23 Thread Jonas Rosling
-Ursprungligt meddelande- Från: Chris [mailto:[EMAIL PROTECTED] Skickat: den 23 maj 2006 10:24 Till: Jonas Rosling Kopia: PHP List Ämne: Re: [PHP] Getting an advanced foreach to work > From a performance point of view you're much better off doing: > $sales_count = count($s

SV: [PHP] Getting an advanced foreach to work SOLVED

2006-05-23 Thread Jonas Rosling
-Ursprungligt meddelande- Från: Jonas Rosling [mailto:[EMAIL PROTECTED] Skickat: den 23 maj 2006 10:06 Till: PHP List Ämne: [PHP] Getting an advanced foreach to work Should look like this: foreach (${$salespersons[$count]} AS $key => $value) { -- PHP General Mailing List (h

[PHP] Getting an advanced foreach to work

2006-05-23 Thread Jonas Rosling
I got the code as follows bellow. I'm having some problems to get it to work. Maybe some of you are able to help me a bit. First of all I got an array (salespersons) containing names of dynamic array names. For example it can contain Johan, Mark, Jenny, Bill etc. By calling for the possision in the

SV: [PHP] HELP - Clean and simple

2006-05-22 Thread Jonas Rosling
-Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Rabin Vincent Skickat: den 22 maj 2006 16:26 Till: Jonas Rosling Kopia: PHP List Ämne: Re: [PHP] HELP - Clean and simple On 5/22/06, Jonas Rosling <[EMAIL PROTECTED]> wrote: > :-) Sorry! I've bee

SV: [PHP] HELP - Clean and simple

2006-05-22 Thread Jonas Rosling
-Ursprungligt meddelande- Från: chris smith [mailto:[EMAIL PROTECTED] Skickat: den 22 maj 2006 15:49 Till: Jonas Rosling Kopia: PHP List Ämne: Re: [PHP] HELP - Clean and simple On 5/22/06, Jonas Rosling <[EMAIL PROTECTED]> wrote: > I don't know if I'm explaining things

[PHP] HELP - Clean and simple

2006-05-22 Thread Jonas Rosling
I don't know if I'm explaining things in a difficult way or not. But I'm gonna try to explaine what I want very clean and simple. 1. I wan't to check if an array is decleard or not, refering to a value in a row/field ($row[0]) 2. If it's not decleard I declear it and assign it's name by the value

[PHP] Group date with category

2006-05-22 Thread Jonas Rosling
Anyone know any good why to group date in a recordset in any good way? As if you categorize it in columns. Like: Category 1 Row1 -> DataData Row2 -> DataData Row3 -> DataData Category 2 Row1 -> DataDate Row2 -> DataData Row3 -> D

SV: [PHP] Array name out of field value with data

2006-05-22 Thread Jonas Rosling
-Ursprungligt meddelande- Från: nicolas figaro [mailto:[EMAIL PROTECTED] Skickat: den 22 maj 2006 11:50 Till: PHP List Ämne: Re: [PHP] Array name out of field value with data Jonas Rosling a écrit : > Not so sure if I've tried to work this out before in this list. > I'm t

[PHP] Array name out of field value with data

2006-05-22 Thread Jonas Rosling
Not so sure if I've tried to work this out before in this list. I'm trying to make an array name by a field/row value and assigning values to it. But I'm having some problems getting it to work. Is it possible to do this? And if, what am I doing wrong? Or is there any other way to do it? while($ro

[PHP] Converting characters

2006-05-17 Thread Jonas Rosling
Hi, the PHP newbie is here again asking questions. Is there anyway in PHP to convert none international characters so the are displayed correct? In my case I have lots of data in the database with å,ä and ö. Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Sessions - session_start()

2006-05-15 Thread Jonas Rosling
Den 06-05-15 16.00, skrev "Thomas Munz" <[EMAIL PROTECTED]>: > put ob_start(); on the first line of your page > > on Monday 15 May 2006 15:53, Jonas Rosling wrote: >> Hi, >> I've been building a site with PHP 5 on my develop machine. I've been &g

Re: [PHP] Sessions - session_start()

2006-05-15 Thread Jonas Rosling
Den 06-05-15 15.56, skrev "nicolas figaro" <[EMAIL PROTECTED]>: > Jonas Rosling a écrit : >> Hi, >> I've been building a site with PHP 5 on my develop machine. I've been woring >> alot with session handling. For example I've been using session

[PHP] Sessions - session_start()

2006-05-15 Thread Jonas Rosling
Hi, I've been building a site with PHP 5 on my develop machine. I've been woring alot with session handling. For example I've been using session_start() now and then depending on where the user/vistor are or are doing. But now I've moved the site to a host server with PHP 4.3.8 and now I keep getti

[PHP] Looking up, deleting and inserting array values

2006-05-10 Thread Jonas Rosling
Hi, I'm trying to do something that I know works when you build an array like a "map" with elements and values. One of the problems with this is that I only get out the values from the array from the last row. And the other problem is it looks like I can't delete desired values within the array. Is

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Jonas Rosling
Nothing. // Jonas Den 06-05-04 14.40, skrev "Jay Blanchard" <[EMAIL PROTECTED]>: > [snip] > $colors = > array('white'=>'#ff','black'=>'#00','blue'=>'#ff'); > [/snip] > > What happens when you echo $colors[1]? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Jonas Rosling
Seem like your missunderstanding me. I'm not using an orignal array. I'm using an "map-array". $array = ('element' = 'value'); // Jonas Den 06-05-04 14.29, skrev "Jay Blanchard" <[EMAIL PROTECTED]>: > [snip] > Is there any way to call for an element value in an array by the > position? > Like

[PHP] Echo a value from an arrays position

2006-05-04 Thread Jonas Rosling
Is there any way to call for an element value in an array by the position? Like position 2 in the array and not the key name. // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Removing key and value

2006-05-04 Thread Jonas Rosling
How's the best way to remove a key and it's value from an array? Like in the code bellow where I would like to remove AK and it's value. $salesperson = array( 'AK' => '1000', 'AT' => '1500', 'BT' => '2000' )

[PHP] Getting the array element

2006-05-04 Thread Jonas Rosling
Hi again all, Here my next PHP newbie question. When I'm building an array as bellow. Is there any way I can get the left element out of the array? $salesperson = array(); while($row=mysql_fetch_array($result)) { $salesperson[$row[1]] = '0'; } If I write: echo $sale

Re: [PHP] array_push in array maps

2006-05-03 Thread Jonas Rosling
oesn't work: $test[$row[2]] = $row[5]; Or: $test[$row(2)] = $row[5]; Do I need to do some kind of concatenating? Thanks again // Jonas Den 06-05-03 15.46, skrev "Jochem Maas" <[EMAIL PROTECTED]>: > Jonas Rosling wrote: >> Need solve another case regardi

[PHP] array_push in array maps

2006-05-03 Thread Jonas Rosling
Need solve another case regarding array maps. Is it possible to insert more values like with array_push in arrays as bellow? $colors = array( 'red' => '#ff', 'green' => 'X00ff00', 'blue' => '#ff' ); Tanks in advance // Jonas -- PHP Ge

[PHP] Searching and getting values out of array maps

2006-05-03 Thread Jonas Rosling
Hi all, I'm kind of new with PHP. I work alot with another language called Lasso, reminds kind of PHP but not the same. I trying to search after a desired value within an array map (think you call it like that in PHP) and to get the value out as well. Is this possible in any way? Like to show you