[PHP] Making Join
> > Hello, > > > > I have 2 tables users table, that stores user info, and photos table, > > i want to select all users with one photo form photos table, but i don't > > want it to be photos * users = result. > > > > Is there way to do it? > > Assuming you mean, you have a table called user_info and another called > photos and each of them has a common element AND there must be a photo for > the user then you could use this sort of select... > > select user_info.name, photo.image from user_info, photo where user_info.id > = photo.user_id > > The above will not display anything if there are no matching id to user_id > so if one of your users didn't have a photo they would not get displayed. > Also, if a user had more than one photo they would all be displayed. > > If your users are expected to have one and only one photo then you may want > get rid of the photo table and just put the photo in the user table. > > HTH Thank You for your reply, but the problem is that users may have many photos, and i need to get only one, i use folllowing sql: SELECT users.username, photos.file FROM users left join photos on users.id=photos.userid And i get: username file dan 9a2de085e456e78ed66f079572638ff3.jpg dan 852d28e6fa730f6d29d69aacd1059ae7.jpg dan 672df2f16e89e3dc92ff74e3a0fa4b4f.jpg dan 8bae6f20ed6e12ba1c86d04b8ebc9e1f.jpg dan 7de9d2db2b2096cfc3f072f8c15a9e50.jpg 404 f474a8ee5965f0a792e5b626fb30c2cd.jpg 404 3acd391cf7abafa032c5e3b21eb7b322.jpg 404 4e5df8cfa4bce5dd30c1166b8a86fa23.jpg Bedman NULL but i want only 3 users from this join, not 3x3=9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Making Join
Mark wrote: > > --- Daniel Harik <[EMAIL PROTECTED]> wrote: >> > > Hello, >> > > >> > > I have 2 tables users table, that stores user info, and photos >> table, >> > > i want to select all users with one photo form photos table, >> but i don't >> > > want it to be photos * users = result. >> > > >> > > Is there way to do it? >> > >> > Assuming you mean, you have a table called user_info and another >> called >> > photos and each of them has a common element AND there must be a >> photo for >> > the user then you could use this sort of select... >> > >> > select user_info.name, photo.image from user_info, photo where >> user_info.id >> > = photo.user_id >> > >> > The above will not display anything if there are no matching id >> to user_id >> > so if one of your users didn't have a photo they would not get >> displayed. >> > Also, if a user had more than one photo they would all be >> displayed. >> > >> > If your users are expected to have one and only one photo then >> you may >> want >> > get rid of the photo table and just put the photo in the user >> table. >> > >> > HTH >> >> >> Thank You for your reply, but the problem is that users may have >> many >> photos, and i need to get only one, i use folllowing sql: >> SELECT users.username, photos.file FROM users left join photos on >> users.id=photos.userid >> >> >> And i get: >> >> username file >> dan 9a2de085e456e78ed66f079572638ff3.jpg >> dan 852d28e6fa730f6d29d69aacd1059ae7.jpg >> dan 672df2f16e89e3dc92ff74e3a0fa4b4f.jpg >> dan 8bae6f20ed6e12ba1c86d04b8ebc9e1f.jpg >> dan 7de9d2db2b2096cfc3f072f8c15a9e50.jpg >> 404 f474a8ee5965f0a792e5b626fb30c2cd.jpg >> 404 3acd391cf7abafa032c5e3b21eb7b322.jpg >> 404 4e5df8cfa4bce5dd30c1166b8a86fa23.jpg >> Bedman NULL >> >> but i want only 3 users from this join, not 3x3=9 > > If you only want the users, and not the photos, then the previous > post should do what you want. But if you also want the photo, and > there's more than one photoo for a user, how will the code know which > photo you want? Do you want a random photo from each user? The last > photo from each user? The first? > > Mark Random is fine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Making Join
Paul Burney wrote: > on 2/28/03 3:15 PM, Daniel Harik at [EMAIL PROTECTED] appended the > following bits to my mbox: > >> Thank You for your reply, but the problem is that users may have many >> photos, and i need to get only one, i use folllowing sql: >> SELECT users.username, photos.file FROM users left join photos on >> users.id=photos.userid >> >> And i get: >> >> username file >> dan 9a2de085e456e78ed66f079572638ff3.jpg >> dan 852d28e6fa730f6d29d69aacd1059ae7.jpg >> dan 672df2f16e89e3dc92ff74e3a0fa4b4f.jpg >> dan 8bae6f20ed6e12ba1c86d04b8ebc9e1f.jpg >> dan 7de9d2db2b2096cfc3f072f8c15a9e50.jpg >> 404 f474a8ee5965f0a792e5b626fb30c2cd.jpg >> 404 3acd391cf7abafa032c5e3b21eb7b322.jpg >> 404 4e5df8cfa4bce5dd30c1166b8a86fa23.jpg >> Bedman NULL >> >> but i want only 3 users from this join, not 3x3=9 > > So you just want the users who have pictures, but not all the pictures for > each? Something like: > > SELECT count(*) AS num_photos, username FROM photos LEFT JOIN users ON > photos.userid=users.id GROUP BY userid > > You could add the file field in there as well, but it would only be > returning one of the files (the first or last one for that user, but I > don't know of a way for you to be specific). > > Hope that helps. > > Sincerely, > Thank You, group by users.id did the trick, but now i have another problem, i want to select users with no photo as well, all with same sql statment, so far i have SELECT users.id, users.gender, users.year, users.month, users.day, users.username, users.city, users.country, users.feet, users.inches, users.cm, users.openingLine, profiles.bodyType, profiles.ethnic, profiles.smoke, profiles.drink, profiles.children, profiles.religion, profiles.moment, photos.file FROM users,profiles, photos WHERE users.id=profiles.userid GROUP BY users.id It works fine selecting random photo for user, but doesn't select users with no photos. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] group by get last record
Hello, Guys i try to join to tables slides: id userid file moment users id username As there few slids per user and i want to get only last one, i use following sql query, but it fetches me first slide. How can i make it fetch last one please? SELECT slides.file, slides.moment, users.id, users.username FROM slides, users where users.id=slides.userid GROUP BY users.id desc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Making tree menu
Hello guys I make following query: mysql> SELECT b.type, a.link AS parent_link, b.link AS child_link FROM bookmarks AS a, bookmarks AS b WHERE a.id = b.parentid order by parent_link; and here is result ++-++ | type | parent_link | child_link | ++-++ | link | MAIN FOLDER | http://www.ee/ | | folder | MAIN FOLDER | SUBFOLDER | | link | MAIN FOLDER | http://www.google.com/ | | link | SUBFOLDER | http://www.amazon.com/ | ++-++ I just can't figure out how can i produce tree style output with php MAIN FOLDER -> -> http://www.google.com/ -> http://www.ee/ -> SUBFOLDER -> http://www.amazon.com/ Any help would be greatly apreciated. Have a nice day. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Table statistics
Hello, I have table with messages, and i have users table, the are linked via PK UserID -> UserID, what i need is to select Messages for current month and calculate top 5 posters list for current month. I have create following query but it's not complete: SELECT Handle, Screen_Name from MBoard where Message_Date>='2003-11-00' ORDER BY Handle; this gets me all messages posted this month ordered by userid Thank You. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Form Validation class
Hello guys, at moment i'm reading "Hack Proofing your web apps" book, but it makes me scared, i have seen a class from newbienetwork.net(can't find it now), that validates user input, things like telephone number, state, country , email, and also can check if only letters or numbers are in text field, my question is this are there classes of this kind around? I would really need it. Thank You very much -- Best regards, Daniel mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Form Validation class
Hello Chris, Thursday, January 03, 2002, 10:41:34 AM, you wrote: CL> Ive seen em on zend.com, I wrote my own. I would recommend you take a look CL> at the ones on zend.com and modify it to taste. CL> -- CL> Chris Lee CL> [EMAIL PROTECTED] CL> "Daniel Harik" <[EMAIL PROTECTED]> wrote in message CL> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> Hello guys, >> >> at moment i'm reading "Hack Proofing your web apps" book, but it makes >> me scared, i have seen a class from newbienetwork.net(can't find it >> now), that validates >> user input, things like telephone number, state, country , email, and >> also can check if only letters or numbers are in text field, my >> question is this are there classes of this kind around? I would really >> need it. >> >> Thank You very much >> >> >> >> -- >> Best regards, >> Daniel mailto:[EMAIL PROTECTED] >> Thank You for your reply That's the reason i've posted, can't find what i'm looking for anywhere -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ' and " in sql query
Hello Guys how can escape chars like ' and " so that MySQL doesn't report me errors all the time, for example when i try to add data like "It's", i always have errors Thank You -- Best regards, Daniel mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] special chars in SQL string
Hello Guys how can escape chars like ' and " so that MySQL doesn't report me errors all the time, for example when i try to add data like "It's", i always have errors Thank You -- Best regards, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Date->TimeStamp
Hello guys I store date in my dbase in folliwing format 2001-08-27 22:24:07, how can i convert this to timestamp and do manipulation Thank You very muc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re:Date->TimeStamp
I've tried this code: $timea = explode(" ",$timepostsed); $timea1 = explode("-",$timea[0]); $timea2 = explode(":",$timea[1]); $timestamp = mktime($timea2[0],$timea2[1],$timea2[2],$timea1[1],$timea1[2],$timea1[0]); But it return "-1" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Re:Date->TimeStamp
Thank You -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php.ini
pane teda c:/php voi c:/windows -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Replace text
Hello guys function replace_text_smiley(){ global $comment; // To add a relation between a text smiley a an image smiley do this: // $faces["text smiley here"] = "img tag to image smile here"; $faces[":)"] = ""; $faces[":P"] = ""; $faces[":D"] = ""; $faces[":("] = ""; $faces[";)"] = ""; while(list($text,$image) = each($faces)) { $comment = str_replace("$text","$image","$comment"); } return $comment; } this function replaces faces to smilies images then in a separete file i use this function and another one to replace urls... the url replacement is ok but it doesn't change the text to smilies.. any guesses?? :) Thnx in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Replace text
Hello guys function replace_text_smiley(){ global $comment; // To add a relation between a text smiley a an image smiley do this: // $faces["text smiley here"] = "img tag to image smile here"; $faces[":)"] = ""; $faces[":P"] = ""; $faces[":D"] = ""; $faces[":("] = ""; $faces[";)"] = ""; while(list($text,$image) = each($faces)) { $comment = str_replace("$text","$image","$comment"); } return $comment; } this function replaces faces to smilies images then in a separete file i use this function and another one to replace urls... the url replacement is ok but it doesn't change the text to smilies.. any guesses?? :) Thnx in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Excel to MySQL
Hello guys Thank You very much for your previous replies, could u help me with 1 more thing? You see i have huge(for me) 100 000 record access table, i wanted to convert it to mysql, i thought of making php convertor that uses odbc and mysql, but maybe there is faster way? And other thought was also read in RAW format excel file with perl, and take advantage of DBI? Anyways how would u do it? Thank You very much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Excel to MySQL
I used Jeff's method http://adsl20066.estpak.ee/emt here is it working live Thank You Jeff so much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Excel to MySQL
Guys getting more serious here now, 3 500 000 records, foxPro i'll try Jeff's method -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] spliting results into 2 colomns
Hello Guys I have following code, sorry it's pretty big for posting, i want to split the output into 2 colomns, been trying almost all still can't get it working here the link, with this code online http://funzz.cjb.net/itfaq/kbase.php -- "; $numOfRows = mysql_num_rows ($result); for ($i = 0; $i < $numOfRows; $i++){ $topicid = mysql_result ($result, $i, "topicid"); $topicname = mysql_result ($result, $i, "topicname"); $result1 = mysql_query("select time from nuke_stories where topic=$topicid"); $counter=mysql_num_rows($result1); preg_match ("/([A-Z])/i", $topicname); $letter=$topicname[0]; if($lastletter!=$letter)echo "$letter"; echo "$topicname ($counter) "; $lastletter=$letter; } echo ""; } else{ echo mysql_errno().": ".mysql_error().""; } mysql_close (); include "footer.php"; ?> -- Thank You very much, in advance Have a nice day :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] spliting results into 2 colomns
WoW, thank you very much DL Neil, this is the best reply i've ever got during my time on the web (since 1994). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] spliting results into 2 colomns
I't just came into my mind, if 1 simple split that arrey in to 2 arrays, it would be much simplier and wouldn't need second loop, i just wanted to know how can i split 1 array in 2 arrays Thank You -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] split array in 2 halfs
Good evening I was wondering how can I split, array that has 60 elements in it, into 2 arrays with 30 elements each? Thank You very much and have a good night :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] split array in 2 halfs
Want to split it in half 1 Big array: 1 2 3 4 5 6 Want to make 1 Small array: 1 2 3 2 Small array: 4 5 6 Thank You -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Redirect use back after execution
Hello I'm making vbulletin foru hack, that allows to rate members my code is just 50 lines, I set link to my script from vBulletin page, and after it has been clicked code executes, and then i want to return user to the page where he clicked the link leading to my code, i was wondering how can this be done, use REFERER and then header("Locatiom: $REFERER";), will this work? Thank you very much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Passing many valaues to function
Hello I need to pass about 15 values to function, what would be best way of doing it? Thank you very much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] Passing many valaues to function
I have following code vallidateForm($HTTP_POST_VARS); }else{ $user->displayForm(); } Why i try to run it i get error Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\program files\apache group\apache\htdocs\cms\member.php on line 235 Thank you very much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Running 1 more script inside
Hello Thank you for your prevoius replies I have 1 main php and 1 chil, i was wondreing how can i execute that child php file from parent, i just don't know how to do it with eval() function Thank You very much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Running 1 more script inside
Yes i tried that, but problem, is that child file is 1 more class, if i include it i get error: Fatal error: Cannot redeclare class blocks in c:\program files\apache group\apache\htdocs\cms\blocks.php on line 3 Thank You Have a nice day -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Access $HTTP_POST_VARS from class member fucntion
Hello I have a class called Member, it has member function called vallidateForm(), i try to pass it a $HTTP_POST_VARS array it looks like this: clas Member{ var $HTTP_POST_VARS; function vallidateForm ($HTTP_POST_VARS){ echo $HTTP_POST_VARS['frmUsername']; } } $user = new Member; if($action=="register"){ global $HTTP_POST_VARS; $user->vallidateForm($HTTP_POST_VARS); }else{ $user->displayForm(); } ?> But i can't acces $HTTP_POST_VARS['frmUsername'] within the function Thank You very much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Generate Alphabet
Hello Guys, Just a stupid question how can i make php show from a-z with a for loop, don't want to make 26 hard coded links Thank You very much -- Best regards, Daniel mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Generate Alphabet
Hello Fred, Tuesday, December 25, 2001, 7:55:16 PM, you wrote: F> for ($Character = 65; $Character < 91; $Character++) F> { F> echo chr($Character); F> } F> Fred F> Daniel Harik <[EMAIL PROTECTED]> wrote in message F> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> Hello Guys, >> >> Just a stupid question how can i make php show from a-z with a for >> loop, don't want to make 26 hard coded links >> >> Thank You very much >> >> -- >> Best regards, >> Daniel mailto:[EMAIL PROTECTED] >> Thank you -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Display output in 2 colomns
Hello guys I have following code, it splits 1 array into 2(to make 2 colomns out of 1) and then displays it, but for some reason it only displayes 1 array not second $i=0; $this->query( "select * from topics"); while($this->fetchRow()){ $array[$i] = $this->record["name"]; $i++; } $count = count($array); $count = $count/2; $count = round($count,0); $x = 0; echo "\n"; foreach($array as $key => $value) { if ($x <=$count) { $array1[] = $value; } elseif($x > $count) { $array2[] = $array[$x]; } echo "$array1[$x]$array2[$x]\n"; $x++; } echo "\n"; --- Thank You very much -- Best regards, Daniel mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] Display output in 2 colomns
Hello akul, Wednesday, December 26, 2001, 5:50:29 PM, you wrote: aoc> Hello Daniel, aoc> Tuesday, December 25, 2001, 5:09:05 PM, you wrote: DH>> Hello guys DH>> I have following code, it splits 1 array into 2(to make 2 colomns DH>> out of 1) and then displays it, but for some reason it only displayes DH>> 1 array not second aoc> Because you didn't close TD DH>> DH>> $i=0; $this->>>query( "select * from topics"); while($this->>>fetchRow()){ DH>> $array[$i] = $this->record["name"]; DH>> $i++; DH>> } DH>> $count = count($array); DH>> $count = $count/2; DH>> $count = round($count,0); DH>> $x = 0; DH>> echo "\n"; DH>> foreach($array as $key => $value) { DH>> if ($x <=$count) { DH>> $array1[] = $value; DH>> } elseif($x > $count) { DH>> $array2[] = $array[$x]; DH>> } DH>> echo "$array1[$x]$array2[$x]\n"; aoc> ^ aoc> Try this: aoc> echo t('TR',t('TD',$array1[$x]).t('TD',$array2[$x])); aoc> function tagname($tag) aoc> { aoc> $tagname=explode(' ',$tag); aoc> return $tagname[0]; aoc> } aoc> function t($tag,$text) aoc> { aoc> return '<'.$tag.'>'.$text.''; aoc> } Thank You, but still no resut :-( -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Show only few words that var contains
Hello guys, sorry for spamming with questions today, i have varuable called $intro, it's stores pretty big story, but i want to display say 10 first words. Thank You very much -- Best regards, Daniel mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]