Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
How to read XML in PHP
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Higoka" data-source="post: 452823" data-attributes="member: 83624"><p>this should work:</p><p>[CODE=php]$XML_SQL_DataSource = (string) $connection->DataSource;</p><p>$XML_SQL_InitialCatalog = (string) $connection->InitialCatalog;</p><p>$XML_SQL_UserID = (string) $connection->UserID;</p><p>$XML_SQL_Password = (string) $connection->Password;[/CODE]</p><p></p><p>currently they are type of SimpleXMLObject. but looking at the error you need a string type. so you can cast the object into a string by placing [ICODE](string)[/ICODE] in front of it.</p><p></p><p>let me know if it works. currently on mobile so i cant test it myself.</p></blockquote><p></p>
[QUOTE="Higoka, post: 452823, member: 83624"] this should work: [CODE=php]$XML_SQL_DataSource = (string) $connection->DataSource; $XML_SQL_InitialCatalog = (string) $connection->InitialCatalog; $XML_SQL_UserID = (string) $connection->UserID; $XML_SQL_Password = (string) $connection->Password;[/CODE] currently they are type of SimpleXMLObject. but looking at the error you need a string type. so you can cast the object into a string by placing [ICODE](string)[/ICODE] in front of it. let me know if it works. currently on mobile so i cant test it myself. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
How to read XML in PHP
Top