gish Posted December 12, 2008 Share Posted December 12, 2008 Hi am I able to call a method from another class in the same script by doing the following random_class ($_POST['form_value']); or do i have to create a object inside the function like i have below $random_object = new random($_POST['form_value']); $random_object ->random_class($_POST['form_value']); Link to comment https://forums.phpfreaks.com/topic/136765-solved-function-from-another-class/ Share on other sites More sharing options...
waynew Posted December 13, 2008 Share Posted December 13, 2008 $object = new Object(); $returned_value = $object->objects_function(parameters); If function is static $returned_value = Object::objects_function(parameters); Link to comment https://forums.phpfreaks.com/topic/136765-solved-function-from-another-class/#findComment-714304 Share on other sites More sharing options...
gish Posted December 13, 2008 Author Share Posted December 13, 2008 thanks my script now works Link to comment https://forums.phpfreaks.com/topic/136765-solved-function-from-another-class/#findComment-714313 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.