Jump to content

Weird function but it works!


newman445617

Recommended Posts

I am totally stuck here guys. so I came here to PHPFreaks, lol:

 


function personal_panel($Profile) {
global $ibforums, $std;

$styles = array();
	$d = dir('css');
	while (($entry = $d->read()) !== false)
	{
		if (substr($entry, strlen($entry)-4) == '.css')
			$styles[] = substr($entry, 0, strlen($entry)-4);
	}
	$d->close();

	// Only display the style selection box if there's more than one style available
	if (count($styles) == 1)
		echo '<input type="hidden" name="skinstyle" value="'.$styles[0].'" />';
	else if (count($styles) > 1)
	{
		natsort($styles);
		echo "<select name=\"skinstyle\">";
		while (list(, $temp) = @each($styles))

		{
			if ($Profile['skinstyle'] == $temp)
				echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n";
			else
				echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n";
		}
echo '</select>';


	}

return <<<EOF
HTML Code goes here i can use {$variable php} 

[i need to bring that PHP CODE IN HERE TO SHOW ALL OF IT I Tried VARIABLES!]





EOF;
}




 

 

 

 

The problem is I am trying to get That whole code in php ontop to be in here.. and show I Tried replace echo's with variables but that doesn't work.. it displays something like this:

 

I'll take a screenshot for you.

 

1zgclzb.jpg

 

With a list of all .css in my css directory but I Can't get it in there.

 

Thanks in advance!

 

I need it to be in there so it goes along with my Skin settings and form that I removed that code because no point for you to see.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.