Jump to content

jmanfffreak

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jmanfffreak's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Aha! I did not know about this. I will look into it further. Thanks!
  2. Just out of curiosity, why do you need to know?
  3. Hi, I have a simple block of code that I need to pull into strings and then store to a MySQL database label: '(AB56) SOME COMPANY', street: '123 SOME STREET', city: 'SOME CITY', state: 'CA', zip: '12345', country: 'United States', email: '[email protected]', I need to pull everything after each colon ( into their own variable. Hopefully, I can give what I want to be the end result, and people can guide me on how to get there. $label = "AB56"; $company = "SOME COMPANY"; $street = "123 SOME STREET"; $city = "SOME CITY"; $state = "CA"; $zip = "12345"; $fname = "Some"; $lname = "Guy"; $email = "[email protected]"; Is something like this possible given the block of code? Any guidance would be most appreciative. Thanks a ton!
  4. Aha, I know what was wrong. I was doing it right the entire time, but I was including a page within a page, and was doing it wrong.
  5. Well, for some odd reason, that doesnt show much. I have that array above in my config file...it was shortened, I apologize for not closing everything properly. Basically, I have a function that includes /modules/main/index (or is supposed to) in the event that someone just goes to the root directory and/or someone tries to access a page directly. The user can set the system up so that instead of the default page being in /modules/main/index, it can be /modules/main/about or something similar, and this is all controlled by arrays. Is there an easy way of doing this? I have the following setup: $config['IndexPage'] = $config['MenuItems']['Main Menu']['Home'], // Default page that user will be directed to. $config['MenuItems']['Main Menu']['Home'] = array('module' => 'main', 'action' => 'index'); In a totally seperate file, I need to call the variable $config['IndexPage'] as it was just bringing the text straight from the config file, and then stick the last part of the final array on, which would be ['module'] and ['action'] and process it like it was an actual array. Right now, I have the following code calling the array into the code: $home = print_r($myst['IndexPage']); $home = "modules/{$home['module']}/{$home['action']}"; include("{$home}.php"); This, however, returns the following : Warning: include(/modules//.php) failed to open, no files or directory, etc etc. Is there an easier way to do this, or what am I missing here? Thanks for any help.
  6. Hi, I have the following code in one of my configuration files of the application I'm writing: // config.php $config = array( 'IndexPage' => "$config['MenuItems']['Main Menu']['Home']"; // What page should the application default to if no action is specified? 'MenuItems' => array( 'Main Menu' => array( 'Home' => array('module' => 'main', 'action' => 'index'); Essentially, $config['IndexPage'] can change if a user wants a different page when users access the system. I need to basically call the $config['IndexPage'] array as if it were an actual array, and stick it straight into my page. Is there anyway this can be done?
×
×
  • 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.