Jump to content

Little question


Eminem

Recommended Posts

Your code does not work? seems like it should, I am not sure on the , (commas) I usually use . (periods) anyhow, looking at that it does not work?

 

 

$txt is an array and profile_show_pets is an index of the array $txt, so when calling the $txt['profile_show_pets'] it displays what is in the array at index profile_show_pets.

 

Link to comment
https://forums.phpfreaks.com/topic/43735-little-question/#findComment-212329
Share on other sites

$txt <-- This is the variable to an array

['profile_show_kitten'] <-- This is the object within the array

 

<?php $txt = array('profile_show_kitten' => 'Kitten','profile_show_cat' => 'Cat','profile_show_dog' => 'Dog'); ?>

 

SO... if profile_show_kitten is equal to Kitten like above

 

and you do this:

<?php echo $txt['profile_show_kitten']; ?>

Your output will be Kitten

Link to comment
https://forums.phpfreaks.com/topic/43735-little-question/#findComment-212330
Share on other sites

$txt <-- This is the variable to an array

['profile_show_kitten'] <-- This is the object within the array

 

<?php $txt = array('profile_show_kitten' => 'Kitten','profile_show_cat' => 'Cat','profile_show_dog' => 'Dog'); ?>

 

SO... if profile_show_kitten is equal to Kitten like above

 

and you do this:

<?php echo $txt['profile_show_kitten']; ?>

Your output will be Kitten

 

It ends up being just a period as the link. I was a hyperlink that will still link to where it does.

 

Let's say that $txt['profile_show_pets'] shows "Show this member's Pets. I want to make it so it says "Show this person's animal. I want to change the hyperlink text.

Link to comment
https://forums.phpfreaks.com/topic/43735-little-question/#findComment-212337
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.