Jump to content

a function in a array


nathanmaxsonadil

Recommended Posts

Hi there,

 

I was wondering what am I doing wrong here?

when I go to my site the div is completely empty

if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'before_widget' => '<div id="'.cor().'"><ul><li>',
        'after_widget' => '</ul></li></ul><br/></div>',
        'before_title' => '<div class="submenu"><div class="submenu_line1">',
        'after_title' => '</div></div><ul class="list-cat">',
    ));

Link to comment
https://forums.phpfreaks.com/topic/82574-a-function-in-a-array/
Share on other sites

this is in my functions file in wordpress  :)

http://automattic.com/code/widgets/themes/

here's the code for my function cor()

$num = "category_";
$num1 = "category_";
$num2 = "category";
function cor() {
if ($num == $num1){
$num = $num2;
}ELSE{
$num = $num1;
}
echo $num;
}

Link to comment
https://forums.phpfreaks.com/topic/82574-a-function-in-a-array/#findComment-419774
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.