0

Illegal String Offset

My arrays are defined as `<?php if ( $active_tabs['latest'] ) { ?><li class="active"><a href="#latest-posts-<?php echo $id; ?>" data-toggle="tab"><?php _e('Latest', 'radium'); ?></a></li><?php } ?> <?php if ( $active_tabs['popular'] ) { ?><li><a href="#popular-posts-<?php echo $id; ?>" data-toggle="tab"><?php _e('Popular', 'radium'); ?></a></li><?php } ?> <?php if ( $active_tabs['featured'] ) { ?><li><a href="#featured-posts-<?php echo $id; ?>" data-toggle="tab"><?php _e('Featured', 'radium'); ?></a></li><?php } ?> but returns an Illegal String Offset on this line <?php if ( $active_tabs['latest'] ) { ?>` Could anyone explain why?

7th Mar 2019, 5:17 PM
Selasie
Selasie - avatar
9 Antworten
+ 1
would you please share your code on Code Section and place the link here?
7th Mar 2019, 6:40 PM
jamilxt
jamilxt - avatar
+ 1
like this.
7th Mar 2019, 6:45 PM
jamilxt
jamilxt - avatar
+ 1
here on SoloLearn.
7th Mar 2019, 6:45 PM
jamilxt
jamilxt - avatar
+ 1
What are you trying to achieve here?
7th Mar 2019, 6:56 PM
jamilxt
jamilxt - avatar
+ 1
$active_tabs['latest'] it returns?
7th Mar 2019, 6:57 PM
jamilxt
jamilxt - avatar
0
Do you mean any of the code sharing sites? Like JS Fiddle etc?
7th Mar 2019, 6:43 PM
Selasie
Selasie - avatar
7th Mar 2019, 6:52 PM
Selasie
Selasie - avatar
0
it returns illegal string offset
7th Mar 2019, 7:58 PM
Selasie
Selasie - avatar