Put variables in PHP

Tactics

New Member
Hi everyone,

Im wondering if it's possible to put "bbuserinfo[username]" in a URL thats located in PHP Tags? <?php ... ?>

$file = "http://test.com/test=$bbuserinfo[username]";

It dose not seem to work for me :(
 

Tactics

New Member
In the profiles and maybe the postbit

How should I make a hook in the profile if I want it to be like this:

PHP:
<?php

// set name of XML file
$file = "http://example.com/example.xml?example=$bbuserinfo['field6']";

// load file
$xml = simplexml_load_file($file) or die ("Unable to load XML file!");

// access XML data
echo "Example: " . $xml->PresenceInfo->ExampleText . "<br />";
echo "Example: " . $xml->PresenceInfo->Example . "<br />";
?>


The above is pulling information from an xml file.
 
Top