TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-27-2009, 07:14 PM   #1 (permalink)
The Wanderer
 
Join Date: Jun 2009
Posts: 20
Thanks: 2
tech is on a distinguished road
Default how to appends the given tag to the contents of this tag

dear all..
I need a function to appends the given tag to the contents of this tag.in python we can write like that but php don't know..

def append(self, tag):
"""Appends the given tag to the contents of this tag."""
self.insert(len(self.contents), tag)

please change it into php.

thanks.
tech is offline  
Reply With Quote
Old 06-27-2009, 07:32 PM   #2 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

You really need to help us to help you out. I don't think translating any of the code in the threads that you have made will actually help you out: we'd be handing you fish, instead of teaching you to fish for yourself as the saying goes.

Please define the context in which your code snippets are used and coming from for each thread as the things that you are posting a very generic and any PHP code that we provide might well be wrong for the context in which you need to use it. For example, the append function above could be for any number of different things in Python. In PHP do you want a direct translation or; one working on an array, a user-defined classes, XML-specific classes (SimpleXML, DOM?), etc.?
Salathe is offline  
Reply With Quote
Old 06-27-2009, 10:57 PM   #3 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

If you want to write PHP, learn PHP, I seggust www.tizag.com. No offense, but it is annoying having someone continually asking for a translated function when no effort has been shown on his part at all. Us translating it is really doing you a disservice because you are not learning any PHP, the code we give you may not even work since we don't know the context.
__________________

Village Idiot is offline  
Reply With Quote
Old 06-27-2009, 11:29 PM   #4 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Quote:
please change it into php.
No, please show me that you have at least tried.

I agree with the above posts.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
php/html form to echo text file contents Hustle Absolute Beginners 2 03-10-2009 07:14 AM
getting contents between tags and... Sam Granger General 1 02-05-2008 05:37 PM
Printing Database Contents... 1 page at a time aristoworks XHTML, HTML, CSS 1 01-26-2008 12:18 PM


All times are GMT. The time now is 10:53 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design