Page 1 of 1

Help needed to get multiple values from one variable. its ve

Posted: Tue Nov 15, 2011 11:43 pm
by sakthi6600
Hi I am trying to create custom option. I am using the following code in one of the place. Now the help needed is,

I have to get multiple values in the array function with this variable $fb_new_text. I have already declared this $fb_new_text. But the result so far I get is, i can get only one value of the variable and even if i use multiple values in the variable as commas separated ones, the first value of the variable only I am getting.

Let me know how to get multiple values.

Code: Select all

function header_widget1() {
global $fb_footer_text1,$fb_new_text;

if(!is_page(array($fb_new_text))){
 ?>
<div id="header_widget_2">
<ul class="sidebar_list">
<?php echo(stripslashes (get_option('fb_footer_text1')));?>
</ul>
</div>
<?php 

}}

Re: Help needed to get multiple values from one variable. it

Posted: Wed Nov 16, 2011 12:59 am
by manohoo
Let's try to understand what you want:
1. what is a custom option?
2. what is an array function?
3. is $fb_new_text an array or a single value variable?

In your function you go back and forth between php and html, I advise that you stay within php, and "echo" any html code.

Anyway... I believe that you need to master arrays and functions, you should spend a little time studying those.