mr_mind Posted January 8, 2008 Share Posted January 8, 2008 I have a problem with all of the functions which print data to the window, they don't automatically put a "\r\n" after printing it. Now i was wondering if somehow one could edit the function adding that on to the end, like this: function print($print) { print $print . "\r\n"; } I dont know if this could be done, and when i tried like this it screamed at me so if anyone could help let me know Link to comment https://forums.phpfreaks.com/topic/84983-editing-functions/ Share on other sites More sharing options...
jitesh Posted January 8, 2008 Share Posted January 8, 2008 function print($print) { print $print . "<br>"; } Link to comment https://forums.phpfreaks.com/topic/84983-editing-functions/#findComment-433384 Share on other sites More sharing options...
trq Posted January 8, 2008 Share Posted January 8, 2008 You cannot redefine a function in php. You would need to give the function another name. eg; <?php function myecho($s) { echo $s . "\r\n"; } ?> Link to comment https://forums.phpfreaks.com/topic/84983-editing-functions/#findComment-433429 Share on other sites More sharing options...
mr_mind Posted January 9, 2008 Author Share Posted January 9, 2008 I know that, i was wondering if there is a function available to unset or redefine a function being that i have a lot of pages that would need to be updated Link to comment https://forums.phpfreaks.com/topic/84983-editing-functions/#findComment-434320 Share on other sites More sharing options...
cooldude832 Posted January 9, 2008 Share Posted January 9, 2008 the point of the defined functions are generic ability to do a general thing. try using css to space your stuff, if you are trying to get the source code readable then yeah your outta luck Link to comment https://forums.phpfreaks.com/topic/84983-editing-functions/#findComment-434332 Share on other sites More sharing options...
trq Posted January 9, 2008 Share Posted January 9, 2008 if you are trying to get the source code readable then yeah your outta luck Not exactly, there is always the tidy extension. Link to comment https://forums.phpfreaks.com/topic/84983-editing-functions/#findComment-434469 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.