|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 13 Jun 2004 19:30:35 -0000 Issue 2819
php-general-digest-help
lists.php.net
Date: Sun Jun 13 2004 - 14:30:35 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 13 Jun 2004 19:30:35 -0000 Issue 2819
Topics (messages 188177 through 188190):
Problems compiling PHP 5 RC3
188177 by: Luca Spiller
188185 by: raditha dissanayake
Re: PHP pros and cons
188178 by: Lester Caine
Re: [PHP5] Super constructor?
188179 by: Chris
188180 by: FrzzMan
188187 by: Chris
188188 by: Chris
188189 by: FrzzMan
Re: Best Lossless Hi-Res Photo Storage with PHP
188181 by: Kim Steinhaug
Re: session.use_trans_sid = 0 does not work!!!
188182 by: Marcus Merz
Password protected downloads
188183 by: Maldiv
188184 by: raditha dissanayake
188186 by: Torsten Roehr
creating a nested multidimensional array from a query
188190 by: grahama.siren.cc
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I am having a few problems compiling PHP 5 RC 3. I am following the
tutorial at http://uk.php.net/install.apache2 and everything works up
until I start to compile PHP. It all seems to work fine but then when
running make at the end I get:
ln: creating hard link 'libxml.o' to 'libxml.lo': Operation not
permitted
make: *** [libphp5.la] Error 1
I am running this as root so I don't get why I am not permitted to do
this. I am also fairly new to Linux (about half a year) so please don't
reply with anything too compicated.
Thanks,
Luca Spiller
P.S. I have posted this here as well as in the installation problems
list as this seems much more active.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.705 / Virus Database: 461 - Release Date: 12/06/2004
attached mail follows:
Luca Spiller wrote:
>I am having a few problems compiling PHP 5 RC 3. I am following the
>tutorial at http://uk.php.net/install.apache2 and everything works up
>until I start to compile PHP. It all seems to work fine but then when
>running make at the end I get:
>
>ln: creating hard link 'libxml.o' to 'libxml.lo': Operation not
>permitted
>
>
Possibly because creating a hard link between two partitions is not
allowed you will have to use a symbolic link instead. (ln -s)
--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.
attached mail follows:
Chris Shiflett wrote:
> --- Steve Douville <php
douville.net> wrote:
>
>>I do like CF's ability to just name data sources on the server and
>>reference them that way.
>
>
> You won't be able to reproduce the "cfadmin" stuff with PHP, simply
> because PHP isn't a persistent process, but I think great strides will be
> made on the database front with this:
>
> http://pecl.php.net/package/PDO
>
> One of ColdFusion's strengths has always been uniforum database access
> within the code without the extra cost of a userland database abstraction
> layer. PDO should give PHP developers that same mix of consistency and
> performance.
PDO has a long way to go to catch up with ADOdb, and I think that
demonstrates one of the strengths of PHP. There is a large developer
base working on solutions to their own problems, but making the results
freely available to everybody.
I did a couple of papers at the Firebird Conference last month, one of
which was on PHP. While researching it I found a set of useful figures
on the http://www.securityspace.com/sspace/index.html site
Todays figures
http://www.securityspace.com/s_survey/data/200405/index.html
Apache has 70% of the world market
http://www.securityspace.com/s_survey/data/man.200405/apachemods.html
PHP is installed on 52% of those machines ( and that does not include
the IIS machines its running on ! )
I'd already standardised on PHP5, but those figures gave me a warm
feeling when I confirmed them.
Add Firebird and you have a package of Webserver, Scripting and Database
that is totally free and runs of Linux or Windows - which ever your
customer insists on.
Objections - It's not compiled. This is both a good and bad thing. The
advantage is that minor changes in a page can be made almost on the fly
without having to rebuild the whole application. IF speed becomes a
problem then one of the caching packages can be added, and if that is
not good enough, then you can easily load share, by running two or more
machines. One or more running Apache/PHP, and a second (or more )
running the database.
PHP5 is not released yet, but personally I've had no problems with the
prerelease stuff in the last few months and no failures on the demo
machine at all in that time. Try ibWebAdmin.lsces.co.uk to see what can
be done.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
attached mail follows:
FrzzMan wrote:
> Hi guys, hey don't laugh at the subject, in fact I don't what to call
> it, so let's call it super constructor :D
>
> Let's see following code...
>
> class Base
> {
> __construct()
> {
> // Do something
> }
> }
>
> class One extends Base
> {
> __construct()
> {
> // Do nothing
> }
> }
>
> class OneMore extends One
> {
> __construct()
> {
> // Do things :D
> }
> }
>
> So when I create an instance of OneMore class by:
>
> $OneMoreInstance = new OneMore()
>
> The __construct() method of class OneMore will be called, not the one
> of One and Base, right?
>
> So is there any way around to make the Base class have a contructor
> that will be called everytime one of its child initialize?
>
> My problem, I want all of the classes in my object are extend from one
> base class, so they are all have some common properties and function,
> but PHP won't implicit call the contructor (that's the right way)...
> btw, in my case, this is bad, as bad as every constructor would be
> called...
>
> Well, hope you understand what I'm trying to say...
>
I'm not positive I understand you correctly, but I think this will
answer your question.
Example Classes:
class ParentClass
{
function __construct()
{
echo 'ParentClass::__construct()',"\r\n";
}
}
class ChildClass extends ParentClass
{
/*
function __construct()
{
parent::__construct();
echo 'ChildClass::__construct()',"\r\n";
}
//*/
}
class GrandChildClass extends ChildClass
{
function __construct()
{
parent::__construct();
echo 'GrandChildClass::__construct()',"\r\n";
}
}
__construct is just like any other method, if you overload it (redefine
it in a child class), the parent method will not be called
automatically, so, if you want the functionality of both, you can call
the parent constructor from the childs constructor. If the direct parent
doesn't have a constructor, the next parent's constructor is checked and
so on.
In the above example when defining a GrandChildClass, its constructor
and the ParentClass::__construct() are will both run. If you uncomment
ChildClass::__construct(), it will run as well.
attached mail follows:
Yeah you understood me, thanks god :D but not fully :(
But the problem is right in your code (sorry :D)
What if I create an instance of ChildClass, its constructor won't be
called (since it commented out), but if I un-comment its constructor, it
will be called even if I create an instance of GrandChildClass?
Let me make some simple diagram ;)
Class1 <-- Class2 <-- Class3 <-- Class4
If I create an instance of Class4, then Class4's constructor and
Class1's constructor must be called, neither Class3 nor Class2.
You can see that Class1's constructor will always be called, and the
constructor of the lowest class in the class tree will be called.
I think this is a bit complex, I can define a final function in Class1,
and call it in every deriver class constructor, it will solve the
problem (I think) but it's not convenience, I want it done automatically...
Any idea are welcome :D
Chris wrote:
> FrzzMan wrote:
>
>> Hi guys, hey don't laugh at the subject, in fact I don't what to call
>> it, so let's call it super constructor :D
>>
>> Let's see following code...
>>
>> class Base
>> {
>> __construct()
>> {
>> // Do something
>> }
>> }
>>
>> class One extends Base
>> {
>> __construct()
>> {
>> // Do nothing
>> }
>> }
>>
>> class OneMore extends One
>> {
>> __construct()
>> {
>> // Do things :D
>> }
>> }
>>
>> So when I create an instance of OneMore class by:
>>
>> $OneMoreInstance = new OneMore()
>>
>> The __construct() method of class OneMore will be called, not the one
>> of One and Base, right?
>>
>> So is there any way around to make the Base class have a contructor
>> that will be called everytime one of its child initialize?
>>
>> My problem, I want all of the classes in my object are extend from one
>> base class, so they are all have some common properties and function,
>> but PHP won't implicit call the contructor (that's the right way)...
>> btw, in my case, this is bad, as bad as every constructor would be
>> called...
>>
>> Well, hope you understand what I'm trying to say...
>>
> I'm not positive I understand you correctly, but I think this will
> answer your question.
>
> Example Classes:
> class ParentClass
> {
> function __construct()
> {
> echo 'ParentClass::__construct()',"\r\n";
> }
> }
> class ChildClass extends ParentClass
> {
> /*
> function __construct()
> {
> parent::__construct();
> echo 'ChildClass::__construct()',"\r\n";
> }
> //*/
> }
> class GrandChildClass extends ChildClass
> {
> function __construct()
> {
> parent::__construct();
> echo 'GrandChildClass::__construct()',"\r\n";
> }
> }
>
> __construct is just like any other method, if you overload it (redefine
> it in a child class), the parent method will not be called
> automatically, so, if you want the functionality of both, you can call
> the parent constructor from the childs constructor. If the direct parent
> doesn't have a constructor, the next parent's constructor is checked and
> so on.
>
> In the above example when defining a GrandChildClass, its constructor
> and the ParentClass::__construct() are will both run. If you uncomment
> ChildClass::__construct(), it will run as well.
attached mail follows:
Well, when you instantiate Class4 PHP will check for it's constructor.
If it has one, it will call it. If not it will check Class3, then
Class2, then Class1.
Once it finds a constructor, it stops looking for more, but if you want
it to resume checking the the parents for constructors you must call
parent::_construct() from the one it found.
If you define a constructor in Class4, It will run in all but one
circumstance. If a child has a constructor, but does not call
parent::_construct() from it. That would stop this waterfall effect.
FrzzMan wrote:
> Yeah you understood me, thanks god :D but not fully :(
>
> But the problem is right in your code (sorry :D)
>
> What if I create an instance of ChildClass, its constructor won't be
> called (since it commented out), but if I un-comment its constructor,
> it will be called even if I create an instance of GrandChildClass?
>
> Let me make some simple diagram ;)
>
> Class1 <-- Class2 <-- Class3 <-- Class4
>
> If I create an instance of Class4, then Class4's constructor and
> Class1's constructor must be called, neither Class3 nor Class2.
>
> You can see that Class1's constructor will always be called, and the
> constructor of the lowest class in the class tree will be called.
>
> I think this is a bit complex, I can define a final function in
> Class1, and call it in every deriver class constructor, it will solve
> the problem (I think) but it's not convenience, I want it done
> automatically...
>
> Any idea are welcome :D
attached mail follows:
Because /$GrandChildClass;/ Is an object. So when you go to echo it, PHP
tries to convert it to a string.
Pham Cong Dinh wrote:
> Hi all,
>
> I tested Chris's code:
>
> <?php
>
> class *ParentClass*
> {
> function __construct()
> {
> echo 'ParentClass::__construct()',"\r\n";
> }
> }
> class *ChildClass *extends ParentClass
> {
> /*
> function __construct()
> {
> parent::__construct();
> echo 'ChildClass::__construct()',"\r\n";
> }
> //*/
> }
> class *GrandChildClass *extends ChildClass
> {
> function __construct()
> {
> parent::__construct();
> echo 'GrandChildClass::__construct()',"\r\n";
> }
> }
>
> $GrandChildClass = new GrandChildClass();
> echo $GrandChildClass;
> ?>
>
> It resulted:
>
> ParentClass::__construct()
> GrandChildClass::__construct()
> Object id #1
>
> Could anyone kindly tell me why the string "Object id #1" is printed?
>
> Thanks
>
> Dinh
>
> Chris wrote:
>
>> FrzzMan wrote:
>>
>>> Hi guys, hey don't laugh at the subject, in fact I don't what to
>>> call it, so let's call it super constructor :D
>>>
>>> Let's see following code...
>>>
>>> class Base
>>> {
>>> __construct()
>>> {
>>> // Do something
>>> }
>>> }
>>>
>>> class One extends Base
>>> {
>>> __construct()
>>> {
>>> // Do nothing
>>> }
>>> }
>>>
>>> class OneMore extends One
>>> {
>>> __construct()
>>> {
>>> // Do things :D
>>> }
>>> }
>>>
>>> So when I create an instance of OneMore class by:
>>>
>>> $OneMoreInstance = new OneMore()
>>>
>>> The __construct() method of class OneMore will be called, not the
>>> one of One and Base, right?
>>>
>>> So is there any way around to make the Base class have a contructor
>>> that will be called everytime one of its child initialize?
>>>
>>> My problem, I want all of the classes in my object are extend from
>>> one base class, so they are all have some common properties and
>>> function, but PHP won't implicit call the contructor (that's the
>>> right way)... btw, in my case, this is bad, as bad as every
>>> constructor would be called...
>>>
>>> Well, hope you understand what I'm trying to say...
>>>
>> I'm not positive I understand you correctly, but I think this will
>> answer your question.
>>
>> Example Classes:
>> class ParentClass
>> {
>> function __construct()
>> {
>> echo 'ParentClass::__construct()',"\r\n";
>> }
>> }
>> class ChildClass extends ParentClass
>> {
>> /*
>> function __construct()
>> {
>> parent::__construct();
>> echo 'ChildClass::__construct()',"\r\n";
>> }
>> //*/
>> }
>> class GrandChildClass extends ChildClass
>> {
>> function __construct()
>> {
>> parent::__construct();
>> echo 'GrandChildClass::__construct()',"\r\n";
>> }
>> }
>>
>> __construct is just like any other method, if you overload it
>> (redefine it in a child class), the parent method will not be called
>> automatically, so, if you want the functionality of both, you can
>> call the parent constructor from the childs constructor. If the
>> direct parent doesn't have a constructor, the next parent's
>> constructor is checked and so on.
>>
>> In the above example when defining a GrandChildClass, its constructor
>> and the ParentClass::__construct() are will both run. If you
>> uncomment ChildClass::__construct(), it will run as well.
>>
>
attached mail follows:
Try var_dump($GrandChildClass) or print_r($GrandChildClass) everytime
you need to inspect variable content. Not echo...
PS: Hi there Vietnamese guy, same here ;)
Chris wrote:
> Because /$GrandChildClass;/ Is an object. So when you go to echo it, PHP
> tries to convert it to a string.
>
>
> Pham Cong Dinh wrote:
>
>> Hi all,
>>
>> I tested Chris's code:
>>
>> <?php
>>
>> class *ParentClass*
>> {
>> function __construct()
>> {
>> echo 'ParentClass::__construct()',"\r\n";
>> }
>> }
>> class *ChildClass *extends ParentClass
>> {
>> /*
>> function __construct()
>> {
>> parent::__construct();
>> echo 'ChildClass::__construct()',"\r\n";
>> }
>> //*/
>> }
>> class *GrandChildClass *extends ChildClass
>> {
>> function __construct()
>> {
>> parent::__construct();
>> echo 'GrandChildClass::__construct()',"\r\n";
>> }
>> }
>>
>> $GrandChildClass = new GrandChildClass();
>> echo $GrandChildClass;
>> ?>
>>
>> It resulted:
>>
>> ParentClass::__construct()
>> GrandChildClass::__construct()
>> Object id #1
>>
>> Could anyone kindly tell me why the string "Object id #1" is printed?
>>
>> Thanks
>>
>> Dinh
>>
>> Chris wrote:
>>
>>> FrzzMan wrote:
>>>
>>>> Hi guys, hey don't laugh at the subject, in fact I don't what to
>>>> call it, so let's call it super constructor :D
>>>>
>>>> Let's see following code...
>>>>
>>>> class Base
>>>> {
>>>> __construct()
>>>> {
>>>> // Do something
>>>> }
>>>> }
>>>>
>>>> class One extends Base
>>>> {
>>>> __construct()
>>>> {
>>>> // Do nothing
>>>> }
>>>> }
>>>>
>>>> class OneMore extends One
>>>> {
>>>> __construct()
>>>> {
>>>> // Do things :D
>>>> }
>>>> }
>>>>
>>>> So when I create an instance of OneMore class by:
>>>>
>>>> $OneMoreInstance = new OneMore()
>>>>
>>>> The __construct() method of class OneMore will be called, not the
>>>> one of One and Base, right?
>>>>
>>>> So is there any way around to make the Base class have a contructor
>>>> that will be called everytime one of its child initialize?
>>>>
>>>> My problem, I want all of the classes in my object are extend from
>>>> one base class, so they are all have some common properties and
>>>> function, but PHP won't implicit call the contructor (that's the
>>>> right way)... btw, in my case, this is bad, as bad as every
>>>> constructor would be called...
>>>>
>>>> Well, hope you understand what I'm trying to say...
>>>>
>>> I'm not positive I understand you correctly, but I think this will
>>> answer your question.
>>>
>>> Example Classes:
>>> class ParentClass
>>> {
>>> function __construct()
>>> {
>>> echo 'ParentClass::__construct()',"\r\n";
>>> }
>>> }
>>> class ChildClass extends ParentClass
>>> {
>>> /*
>>> function __construct()
>>> {
>>> parent::__construct();
>>> echo 'ChildClass::__construct()',"\r\n";
>>> }
>>> //*/
>>> }
>>> class GrandChildClass extends ChildClass
>>> {
>>> function __construct()
>>> {
>>> parent::__construct();
>>> echo 'GrandChildClass::__construct()',"\r\n";
>>> }
>>> }
>>>
>>> __construct is just like any other method, if you overload it
>>> (redefine it in a child class), the parent method will not be called
>>> automatically, so, if you want the functionality of both, you can
>>> call the parent constructor from the childs constructor. If the
>>> direct parent doesn't have a constructor, the next parent's
>>> constructor is checked and so on.
>>>
>>> In the above example when defining a GrandChildClass, its constructor
>>> and the ParentClass::__construct() are will both run. If you
>>> uncomment ChildClass::__construct(), it will run as well.
>>>
>>
attached mail follows:
Hei,
Regarding the jpg compression, we did some testing along with our customers
press buereu's (I think thats the name, the ones that do all the prints and
designs the logoes and such). Here we did som testing on the images
and the quality.
What we experienced was that if we converted the images to JPG with
a quality of 10 it was good enough for most people. I however still use
11 just to be safe. (We are ofcourse talking about >300DPI images)
So there you have it, quality 10 is still good enough quality for print.
However - be aware of another stupid fact - people expecting high resolution
downloads wont download a 4-5mb jpg image, since it cant (?) be good
enough quality... They are simply expecting a 50MB tif image since this
is what they are working with normally. This is infact a huge problem!
So much depending on you customers, but saving as a jpg should be just fine.
--
--
Kim Steinhaug
----------------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
----------------------------------------------------------------------
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
----------------------------------------------------------------------
"Galen" <phplist
zinkconsulting.com> wrote in message
news:E373719B-BD0A-11D8-A2F1-000D932A3B7E
zinkconsulting.com...
> On Jun 12, 2004, at 4:36 PM, Kim Steinhaug wrote:
>
> > well, there are formats that have impressed me. The Mpg-4 format
> > which requires plugins all over the place is really amazing, from
> > e-vue.
> > They also provide a plugin atleast for IE to browse the images.
> >
> > I dont know if you can compress images outside the windows platform
> > however.
> >
>
> That's a key problem. I don't touch Windows unless I have to, so I
> don't primarily run it at home and my servers _never_ run it, so this
> format is totally out of the running - I need to be able to
> compress/decompress on *nix based machines.
>
> > If your looking for supreme quality however, you would need to stay
> > away from the lossy formats and probably go for TIFF which is a great
> > format and is also supported by any major software. PNG however is
> > abit "strange", woudnt sendt PNG images to a publisher...
> >
> >
> > You could ZIP the TIF images on the HD to same space, you often
> > get good results on this. This would also make the downloads better
> > for the user, and since all the browsing online would use thumbnails
> > you
> > dont need to waste CPU do depack the images, since you all users
> > can depack a ZIP file (thats the least you would expect from a user
> > that
> > purchase a High resolution image).
>
> I've experimented, PNG is notably better than ZIP for compressing image
> material. PNG retains 100% quality and offers the smallest file sizes
> around in a file that can be read by almost any system (i.e. all
> half-recent browsers, photoshop, most other graphics applications,
> etc). There's no reason I can't also offer a TIFF file, but I'll
> primarily route the user to the PNG file because it's simply the
> smallest download yet retains 100% quality and is a completely "free"
> format.
>
> >
> > Ive created such systems myself, and my sollution was another :
> > Plug in a new harddrive. We save the images as jpg, tif, eps, ai or
> > whatever
> > the original image was created as, and create thumbnails at various
> > resolutions in high compressed jpg for fast browsing. Often I tend to
> > ZIP the lossless images aswell, but then again I dont need to since HD
> > isnt
> > a problem atleast in my case.
> >
>
> I have a similar system implemented with thumbnails and caching and all
> sorts of things. Works great. But hard drive space is a major concern,
> so I have to be more conservative with the hi-res versions.
>
> > Hope this helps.
> >
>
> Well, it's good to know that somebody else works with this sort of
> thing. Although I was really hoping to hear from someone who's worked
> with JPEG 2000 lossless (much higher than PNG image compression ratio!)
> via ImageMagick or something similar to that. Or perhaps any other
> interesting solutions people have come up with that beat PNG for
> compression. More thoughts anybody?
attached mail follows:
Hi James,
"James Harrell" <jharrell
copernicusllc.com> schrieb im Newsbeitrag
news:FHELIIHLFCGNIJGPHNNMKEFPEFAA.jharrell
copernicusllc.com...
[...]
> If you want to forcefully remove this PHPSESSION (which is sometimes
> a good idea since search engine spiders will catalog the links with
> the session id if you don't remove it), try this:
>
> ini_set("session.use_only_cookies","1");
If this is not an option and you still want to not have session id's
appended when a searchengine robot comes to your site, you could detect the
UA and just do not start a session in that case.
> James
Regards,
Marcus
attached mail follows:
Hello,
I want to make a password protected download possibility on my site. I know
how can I handle normal user login, but how can I protect a download from
guests?
I mean if user navigate to www.demo.com/mydownload.zip than he can download
the file without login. How can I prevent this downloads?
Thanks for your help!
attached mail follows:
Maldiv wrote:
>Hello,
>
>
>
hi
>I want to make a password protected download possibility on my site. I know
>how can I handle normal user login, but how can I protect a download from
>guests?
>
>
This question has been often asked in the past, the archives are rich
with solutions. One solution is NOT to create a direct download link but
to deliver the file via a php script (fpassthru) that can check login
status. Another is to use .htpasswd protection you will find lots of
details in the archives.
--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.
attached mail follows:
"Maldiv" <bali1a
freemail.hu> wrote in message
news:20040613143024.8170.qmail
pb1.pair.com...
> Hello,
>
> I want to make a password protected download possibility on my site. I
know
> how can I handle normal user login, but how can I protect a download from
> guests?
> I mean if user navigate to www.demo.com/mydownload.zip than he can
download
> the file without login. How can I prevent this downloads?
One way is to store all your download files outside of the webroot and/or
protect the directory with .htacces. Then use PEAR's HTTP_Download to serve
the files as a download to the user:
http://pear.php.net/package/HTTP_Download
Hope this helps. Regards,
Torsten Roehr
attached mail follows:
Hi :)
I am on my second week of php so be gentle
I am creating an XML file out of a mysql query with nested arrays.
Currently I can get 1 element and 1 child with a properly formatted XML
file with the below script .
My question is: How do I add 3 to 4 more child elements to the below
'playlist' array ?
Currently ,I have one parent 'Artist' and one child 'english' ...
I need to add more child elements to the 'Artist' array like urlPath,
spanish, biography, etc
Do I have to add another dimension to the 'playlist' array? Do I need
another foreach loop ?
Is there an easier more efficient way to do this?
Be nice to spell out the schema in some way in the script...in case you
need to add more levels...like a 'subCategory'
I am a bit new to this so any help would be greatly appretiated ....
head is spinning a bit
$sql = 'SELECT artist.artist_name, media.english, media.path ';
$sql .= 'FROM media, artist ';
$sql .= 'WHERE artist.artist_id = media.artist_id LIMIT 0, 30 ';
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result))
{
$playlist[$row['artist_name']] [] = $row['english'];
//would like to add more children here...
}
$xml = "<sirenreels>\n";
foreach ($playlist as $artist => $media)
{
$num_media = count($media);
$xml .= "<artist>\n";
$xml .= "\t<meta>\n";
$xml .= "\t\t<title>".$artist."</title>\n";
$xml .= "\t</meta>\n";
$xml .= "\t<content>\n";
foreach ($media as $mediaVal)
{
$xml .= "\t\t<media>\n";
$xml .= "\t\t\t<english_name>".$mediaVal."</english_name>\n";
///add more children
///add more children
$xml .= "\t\t</media>\n";
}
$xml .= "\t</content>\n";
$xml .= "</artist>\n";
}
$xml .= "</sirenreels>\n";
print $xml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]