BrainPill Posted February 22, 2019 Share Posted February 22, 2019 (edited) I have browscap installed this way: X:/wamp64/browscap/lite_php_browscap.ini If I use the following code: <?php $browser = get_browser(null, true); var_dump($browser); $brows_par = $browser['parent']; $browser = $browser['browser']; $version = $browser['version']; $platform = $browser['platform']; $dev_type = $browser['device_type']; $mobile = $browser['ismobiledevice']; $tablet = $browser['istablet']; ?> Then I get error messages for the last 5 variable settings error output: Quote Warning: Illegal string offset 'version' and for the other offsets same error message except the first 2. see the image for the var_dump value of $browser what causes the Illegal String Offset warning error message? Edited February 22, 2019 by BrainPill Link to comment Share on other sites More sharing options...
BrainPill Posted February 22, 2019 Author Share Posted February 22, 2019 I solved this meanwhile by changing the $browser variable into $some_var as I assume $browser is a reserved variable by php Link to comment Share on other sites More sharing options...
justsomeguy Posted February 22, 2019 Share Posted February 22, 2019 It's not a reserved variable, you overwrote it: $browser = $browser['browser']; Link to comment Share on other sites More sharing options...
BrainPill Posted February 23, 2019 Author Share Posted February 23, 2019 (edited) okay I understand that. Edited February 23, 2019 by BrainPill Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now