Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7006011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:25:24+00:00 2026-05-27T21:25:24+00:00

I am working on a theme options page and trying to send the css

  • 0

I am working on a theme options page and trying to send the css key to my php css file. I can select the array key from the parent array but i do not know how to grab the css key from the subset. Can anyone assist me on this? I’m quite green to php and am doing my best to learn.

Thanks!

$fonts = array(  
'Arial' => array(  
    'name' => 'Arial',  
    'font' => '',  
    'css' => "font-family: Arial, sans-serif;"  
),  
'ubuntu' => array(  
    'name' => 'Ubuntu',  
    'font' => '@import url(http://fonts.googleapis.com/css?family=Ubuntu);',  
    'css' => "font-family: 'Ubuntu', sans-serif;"  
),  
'lobster' => array(  
    'name' => 'Lobster',  
    'font' => '@import url(http://fonts.googleapis.com/css?family=Lobster);',  
    'css' => "font-family: 'Lobster', cursive;"  
),  
'Lato' => array(
    'name' => 'Lobster',  
    'font' => '@import url(http://fonts.googleapis.com/css?family=Lato);',  
    'css' => "font-family: 'Lato', sans-serif;"
),
'Droid Sans' => array(
    'name' => 'Droid Sans',  
    'font' => '@import url(http://fonts.googleapis.com/css?family=Droid+Sans);',  
    'css' => "font-family: 'Droid Sans', sans-serif;"
),
'Tachoma' => array(  
    'name' => 'Tachoma',  
    'font' => '',  
    'css' => "font-family: Tachoma, Geneva, sans-serif;"  
),  
'Verdana' => array(  
    'name' => 'Verdana',  
    'font' => '',  
    'css' => "font-family: Verdana, Verdana, Geneva, sans-serif;"  
),  
'Times New Roman' => Array(
    'name' => 'Times New Roman',
    'font' => '',
    'css' => "font-family: Times New Roman, Times New Roman, serif;"
),
'Georgia' => array(  
    'name' => 'Georgia',  
    'font' => '',  
    'css' => "font-family: Georgia, serif;"  
),
'Custom Font' => array(
    'name' => $custom_family,
    'font' => $custom_font,
    'css' => "font-family:" . $custom_family . "sans-serif;",
    )  
);
$custom_font = get_option('ideate_custom_font');    
//Extract the values from the URL String that are separated by '='
$name_extract = explode('=', $custom_font);

//Find these characters in the URL string
$find = array("+", ");");
//Add Space or Null the value
$replace = array(" ","");
//Take the Family Value from the String and Remove any Special Characters from 'Find' array
$custom_family_string = str_replace($find,$replace,$name_extract[1]);
//Take Value from String Replacement and Add Quotes Around it
$custom_family = "\"" .$custom_family_string. "\"";
$font_array = array_keys($fonts);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:25:24+00:00Added an answer on May 27, 2026 at 9:25 pm

    I think you just want:

    $font = 'Arial';
    $css = $fonts[$font]['css'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on this test page: http://problemio.com/test.php What I am trying to do
I'm trying to get an autocomplete form working, and I can't seem to figure
I'm trying to create a bulk edit page for an app that I'm working
I have an .htaccess file that I'm trying to convert so it can be
A wordpress theme I'm working on has headlines which span across the entire content
I am now working on changing android theme style at runtime, when the user
I'm working on integrating an HTML template slice into a SiteFinity theme and am
I have no working knowledge of Java script and am trying to get into
I'm working with a theme I paid for a long time ago, customized a
I'm trying to add upload controls to the page. This HTML mark-up with JavaScript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.