RE: Help with Class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

Thanks for the help, but none of those worked. 

 

Anyone else got any suggestions? Or possibly another way of achieving this ?

 

Cheers

Ian

 

  _____  

From: Jason Davidson [mailto:jason.davidson@xxxxxxxxx] 
Sent: 07 September 2005 05:47 PM
To: Ian Barnes
Cc: PHP General
Subject: Re:  Help with Class

 

I would have guessed unset($sqk); to work, but also try $sdk = null;

Jason

On 9/7/05, Ian Barnes <ian@xxxxxxxxxxxx> wrote:

Hi,



I am writing a site where I need to access multiple classes of the same name
located under certain directories. The reason for each directory is because
the class under that directory talks only to the files in that directory and

cant do multiple (its not my software)



I have it so that I choose which ones I want to "post" to via checkboxes. I
then do a foreach loop and here it is:



                        foreach ( $forums as $num=>$val )

                        {

                                    $db = new db ( 'localhost' , 'user' ,
'pass' , 'db' );

                                    $sql = 'SELECT * FROM table WHERE id =
"'.$val.'"';

                                    $result = $db->get($sql);

                                    $fetchd = mysql_fetch_array ( $result );

                                    $forumid = $fetchd['forumid'];

                                    $posterid = $fetchd['posterid'];

                                    $title = $_POST['title'];

                                    $desc = $_POST['desc'];

                                    $post = $_POST['post'];

                                    require_once (
$fetchd['path'].'sdk/ipbsdk_class.inc.php' );

                                    $SDK =& new ipbsdk;

                                    $info = $SDK -> get_info ( $posterid );

                                    $postername = $info['name'];

                                    echo "Forum ID:".$forumid;

                                    echo "<BR>Title:".$title;

                                    echo "<BR>Desc:".$desc;

                                    echo "<BR>Post:".$post;

                                    echo "<BR>PosterID:".$posterid;

                                    echo "<BR>PosterName:".$postername;

                                    echo "<BR>";

                        }



See at the end of that foreach loop I need to unset the class $SDK so I can
re-init it from another dir. How can I do this? I have tried some of the 
following:

Unset ( $SDK);

Unset ($GLOBALS['SDK'] );





Can anyone shed any light on my predicament ?



Thanks in advance

Cheers

Ian

--
PHP General Mailing List ( http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux